program B;

{$APPTYPE CONSOLE}
uses
  SysUtils;

var w,h,a:array[1..6] of longint;
    f:boolean;
procedure REadFile;
var i:integer;
begin
 for i:=1 to 6 do
  begin
   readln(w[i],h[i]);
   a[i]:=0;
  end;

end;
procedure GetAns;
var i,j:integer;
    t:boolean;
begin
  {$O-}

  for i:=1 to 6 do
   begin
    if a[i]=0 then
    begin
     t:=true;
     a[i]:=1;
     for j:=1 to 6 do
     begin
      if (a[j]=0)and(((w[i]=w[j])and(h[i]=h[j]))or((w[i]=h[j])and(h[i]=w[j]))) then
       begin
        a[j]:=1;
        t:=false;
        break;
       end;
     end;
     if t then
      begin
       f:=false;
       break;
      end;
    end;
   end;
   {$O+}
end;
procedure WriteAns;
begin
  if f then writeln('POSSIBLE')
       else writeln('IMPOSSIBLE');
end;
begin
   AssignFile(Input,'box.in');
   AssignFile(Output,'box.out');
   Reset(Input);
   Rewrite(Output);
   f:=true;
   REadFile;
   GetAns;
   WriteAns;

   Close(Input);
   Close(Output);
end.
