{$O+,R-,Q-}
var
 j,i:longint;
 p,aw1,ah1,aw,ah:array[1..6] of longint;
 i1,i2,i3,i4,i5,i6:longint;

begin
 assign(input,'box.in'); reset(input);
 assign(output,'box.out'); rewrite(output);
 for i:=1 to 6 do
  read(aw[i], ah[i]);
 for i1:=1 to 6 do
  for i2:=1 to 6 do if (i1=i2) then continue else
   for i3:=1 to 6 do if (i1=i3) or (i2=i3) then continue else
    for i4:=1 to 6 do if (i1=i4) or (i2=i4) or (i3=i4) then continue else
     for i5:=1 to 6 do if (i1=i5) or (i2=i5) or (i3=i5) or (i4=i5) then continue else
      for i6:=1 to 6 do if (i1=i6) or (i2=i6) or (i3=i6) or (i4=i6) or (i5=i6) then continue else begin
       p[1]:=i1;
       p[2]:=i2;
       p[3]:=i3;
       p[4]:=i4;
       p[5]:=i5;
       p[6]:=i6;
       for i:=0 to 127 do begin // 63?
        for j:=1 to 6 do begin
         if (i and (1 shl (j-1)))>0 then begin aw1[j]:=aw[p[j]]; ah1[j]:=ah[p[j]]; end
         else begin ah1[j]:=aw[p[j]]; aw1[j]:=ah[p[j]]; end
        end;
        if (ah1[1]=ah1[3]) and (ah1[1]=ah1[5]) and (ah1[1]=ah1[6]) and
           (aw1[1]=ah1[4]) and (aw1[1]=ah1[2]) and (aw1[1]=aw1[5]) and
           (aw1[3]=aw1[4]) and (aw1[3]=aw1[2]) and (aw1[3]=aw1[6]) then begin
         writeln('POSSIBLE');
         halt;
        end;
       end;
      end;

 writeln('IMPOSSIBLE');
end.
