{$APPTYPE CONSOLE}

uses SysUtils;

type box=array[1..2] of integer;

var A:array[1..6] of box;
    i,j,t:integer;
    tt:box;

function less(var b1,b2:box):boolean;
begin
 Result:=(b1[1]<b2[1]) or ((b1[1]=b2[1]) and (b1[2]<b2[2])); 
end;

function eq(a,b,c,d:integer):boolean;
begin
 Result:=(a=b) and (b=c) and (c=d);
end;

begin
 reset(input,'box.in');
 rewrite(output,'box.out');

 for i:=1 to 6 do
  begin
   read(A[i,1],A[i,2]);
   if A[i,1]>A[i,2] then begin t:=A[i,1]; A[i,1]:=A[i,2]; A[i,2]:=t; end; 
  end;

 for i:=1 to 6 do
  for j:=i+1 to 6 do
   if less(A[j],A[i]) then
    begin
     tt:=A[i]; A[i]:=A[j]; A[j]:=tt;
    end;

 if eq(A[1,1],A[2,1],A[3,1],A[4,1]) and
    eq(A[1,2],A[2,2],A[5,1],A[6,1]) and
    eq(A[3,2],A[4,2],A[5,2],A[6,2]) then writeln('POSSIBLE')
                                    else writeln('IMPOSSIBLE');
end.
