program Project2;
var f:text;
     a,b:array [1 .. 6 ] of integer;
     i,x,j:integer;
function eqq(x,y,z,k:integer):boolean;
 begin
 eqq:=true;
 if ((x =z)and(y=k))or ((x=k)and(y=z)) then exit;
 eqq:=false;
 end;
function posi : boolean;
 begin
   posi:=false;
   if (a [1 ] <> a[2] )or (b[1]<>b[2]) then exit;
   if (a [3 ] <> a[4] )or (b[3]<>b[4]) then exit;
   if (a [5 ] <> a[6] )or (b[5]<>b[6]) then exit;
   if (a[1]=a[3])and (eqq(b[1],b[3],a[5],b[5])) then
    begin
     posi:=true;
     exit;
    end;
   if (a[1]=a[3])and (eqq(b[1],b[3],a[5],b[5])) then
    begin
     posi:=true;
     exit;
    end;
   if (a[1]=b[3])and (eqq(b[1],a[3],a[5],b[5])) then
    begin
     posi:=true;
     exit;
    end;
   if (b[1]=a[3])and (eqq(a[1],b[3],a[5],b[5])) then
    begin
     posi:=true;
     exit;
    end;
   if (b[1]=b[3])and (eqq(a[1],a[3],a[5],b[5])) then
    begin
     posi:=true;
     exit;
    end;

 end;
begin
  assign ( f, 'box.in');
  reset ( f );
  for i :=1 to 6 do
   begin
    readln ( f, a [ i], b[i]);
    if a [i ] > b[i] then
     begin
      x:= a[i];
      a[i]:=b[i];
      b[i]:=x;
     end;
   end;
  close( f );
  for i := 1 to 5 do
   for j := i+1 to 6 do
    if  (a [i ]> a[j])or ((a[i]=a[j])and(b[i]>b[j])) then
     begin
      x:= a[i];
      a[i]:=a[j];
      a[j]:=x;
      x:= b[i];
      b[i]:=b[j];
      b[j]:=x;
     end;
   assign ( f,'box.out');
   rewrite ( f );
   if posi then writeln (f, 'POSSIBLE') else writeln ( f, 'IMPOSSIBLE');
   close (f);
end.
 