type    side=record
                   x,y          : LongInt;
             end;
var     i,j,k,l,m,n             : LongInt;
        p                       : boolean;
        A                       : Array[1..6] of side;

procedure swap(var a,b: side);
var t: side;
begin
 t:=a;
 a:=b;
 b:=t;
end;

BEGIN
 Assign(Input,'box.in');
 Assign(Output,'box.out');
 Rewrite(Output);
 Reset(INput);
  For i:=1 to 6 do
  begin
   read(a[i].x,a[i].y);
   if a[i].y<a[i].x then
   begin
    l:=a[i].x;
    a[i].x:=a[i].y;
    a[i].y:=l;
   end;
  end;
  For i:=1 to 5 do
   for j:=i+1 to 6 do
    if (a[i].x>a[j].x)or((a[i].x=a[j].x)and(a[j].y<a[i].y)) then
     swap(a[i],a[j]);

  p:=(a[1].x=a[2].x)and(a[2].x=a[3].x)and(a[3].x=a[4].x)and
     (a[3].y=a[4].y)and(a[4].y=a[5].y)and(a[5].y=a[6].y)and
     (a[1].y=a[2].y)and(a[2].y=a[5].x)and(a[5].x=a[6].x);

  if p then writeln('POSSIBLE') else
  writeln('IMPOSSIBLE');

 CLose(Input);
 Close(output);
END.