program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var q:array[1..12]of integer;
a,b,c,k,d,i,kk,j,s,s1:integer;
f,ff:text;
begin
  { TODO -oUser -cConsole Main : Insert code here }
 assign(f,'box.in');reset(f);
k:=-1;        kk:=0;
 for i:=1 to 6 do
 begin
 readln(f,a,b);

if i=1 then s1:=a else if (s1=a) or (s1=b) then kk:=kk+1;

 k:=k+2;
 q[k]:=a;q[k+1]:=b;
 end;
 close(f);


 for c:=1 to 12 do
 for i:=1 to 11 do
 begin
 if q[i]>q[i+1]then begin a:=q[i];q[i]:=q[i+1];q[i+1]:=a;end;
 end;

 if (kk>2) and (q[1]=q[4])and(q[5]=q[8])and(q[9]=q[12])
 then d:=1 else
// if ((q[1]=q[4])and (q[5]=q[12])) or((q[1]=q[8])and (q[9]=q[12]))
// then d:=1 else
 d:=0;
 assign(ff,'box.out');rewrite(ff);
 if d=1  then writeln(ff,'POSSIBLE') else writeln(ff,'IMPOSSIBLE');
 close(ff);
  end.
