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,PA,PB,PC:INTEGER;
begin
 assign(f,'box.in');
 reset(f);
 assign(f1,'box.out');
 rewrite(f1);
 for i:=1 to 6 do
 begin
 readln(f,a[i,1],a[i,2]);
 //b[i]:=false;
 end;
 //b[1]:=true;
 aa:=a[1,1];
 bb:=a[1,2];
 CC:=0;
 t:=0; tt:=0;
     for i:=2 to 6 do begin

     if (aa=a[i,1])then
     begin
     if t=1 then
     begin
     cc:=a[i,2];
     break;
     end else if  (bb<>a[i,2])then
     cc:=a[i,2];
     t:=t+1;
     break;
     end;
     //end;
     if (aa=a[i,2])
     then
       begin
     if t=1 then
     begin
     cc:=a[i,1];
     break;
     end else if  (bb<>a[i,1])then
     cc:=a[i,1];
     t:=t+1;
     break;
     end;

       //if ((aa=a[i,2])or(aa=a[i,1]))and(t=1)  then t:=t+1;
        // if (bb=a[i,2]) or (bb=a[i,1]) then tt:=tt+1;
     end;
     //if tt>4 then cc:=bb;
     //if t>4 then cc:=aa;

       p:=0;PA:=0; PB:=0;PC:=0;
for i:=1 to 6 do begin
  if ((aa=a[i,1])and (bb=a[i,2]))or ((aa=a[i,2])and (bb=a[i,1]))then pa:=pa+1;
  if ((cc=a[i,1])and (bb=a[i,2]))or ((cc=a[i,2])and (bb=a[i,1]))then pb:=pb+1;
  if ((aa=a[i,1])and (cc=a[i,2]))or ((aa=a[i,2])and (cc=a[i,1]))then pc:=pc+1;
         end;
         if (pa=2)and(pb=2)and(pc=2)  then writeln(f1,'POSSIBLE')
         ELSE WRITELN(F1,'IMPOSSIBLE');
 close(f1);
 close(f);

end.
