program Project1;

{$APPTYPE CONSOLE}

var i,n,j,k,l,NUM,s:integer;
        a:array[1..3,1..2] of integer;
        b:array [1..3] of integer;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  assign(input,'box.in');
  assign(output,'box.out');
  reset(input);
  rewrite(output);

  b[1]:=0;
  b[3]:=0;
  b[2]:=0;
  NUM:=0;
  for i:=1 to 6 do begin
    readln(j,k);
    if j>k then begin n:=j; j:=k; k:=n end;
    s:=0;
    if i>1 then begin
        l:=1;
        while l<=num do begin
          if (a[l,1]=j) and (a[l,2]=k) and (b[l]=0) then begin b[l]:=1; s:=1; l:=NUM+1 end;
          l:=l+1;
        end
    end;
    if (s=0) and (NUM=3) then begin writeln('IMPOSSIBLE'); halt(0); end
    else if (s=0) then begin
        NUM:=NUM+1;
        a[NUM,1]:=j;
        a[NUM,2]:=k;
    end
  end;

  i:=1; j:=1; l:=1;
  while j<=3 do begin
    k:=j+1; if k=4 then k:=1;
    if a[j,i]=a[k,1] then i:=2
    else if a[j,i]=a[k,2] then i:=1
    else begin
      if j=1 then begin
        j:=0;
        i:=2;
        l:=2
      end else begin
        writeln('IMPOSSIBLE');
        halt(0);
      end
    end;
    j:=j+1;
  end;

  if (i=l) then writeln('POSSIBLE')
  else writeln('IMPOSSIBLE');

  close(input);
  close(output);
end.
