program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  f,f1:text;
 t,tt,P,K,J ,i:integeR;

 a:ARRAY[1..6,1..2]of integer;
 ab:ARRAY[1..12]of integer;
 //B:ARRAY[1..6]OF BOOLEAN;
 AA,BB,CC,TA,TB,TC:INTEGER;
begin
 assign(f,'box.in');
 reset(f);
 assign(f1,'box.out');
 rewrite(f1);
 WHILE NOT(Eof(f)) DO BEGIN
 t:=0;
 BB:=0;
 for i:=1 to 6 do
 begin
 readln(f,a[i,1],a[i,2]);
 if a[i,1]=a[i,2] then t:=a[i,1];
 end;
 for i:=1 to 6 do
 if a[i,2] <> a[i,1] then
 begin
 aa:=a[I,2];
 bb:=a[I,1];
 break;
 end;
 IF BB=0 THEN BEGIN BB:=T; AA:=T END;
 if t>0 then cc:=t else
 for i:=1 to 6 do
 begin
 if (a[i,1]<>aa)and (a[i,1]<>bb) then begin cc:=a[i,1]; break; end;
 if (a[i,2]<>aa)and (a[i,2]<>bb) then begin cc:=a[i,2]; break; end;
 end;
 ta:=0;
 tb:=0;
 tc:=0;
 for i:=1 to 6 do
 IF (AA=BB) AND (BB=CC) THEN BEGIN TA:=2; TB:=2; TC:=2;  BREAK; END  ELSE
 begin
 if (((a[i,1]=aa)and (a[i,2]=bb)) or ((a[i,2]=aa)and (a[i,1]=bb))) AND (TA<2) then ta:=ta+1 ELSE
 if (((a[i,1]=aa)and (a[i,2]=cc)) or ((a[i,2]=aa)and (a[i,1]=cc))) AND (TC<2) then tc:=tc+1 ELSE
if (((a[i,1]=cc)and (a[i,2]=bb)) or ((a[i,2]=cc)and (a[i,1]=bb))) AND (TB<2) then tb:=tb+1;
end;
if (ta=2) and (tc=2) and (tb=2) then writeln(f1,'POSSIBLE') ELSE WRITELN (F1,'IMPOSSIBLE');

     END;

 close(f1);
 close(f);

end.
