program box1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  Tplate=record
  w,h:integer;
 end;
 tt=array[1..6] of tplate;

var
 v:TT;
 i,j:integer;
 q,p:integer;

 fin,fout:textfile;
 a:array[1..12] of integer;
 find:boolean;


procedure sort;
var
t:integer;
begin
  for i:=1 to 12 do
   for j:=i to 12 do
    if (a[j]>a[i]) then
      begin
        t:=a[i];
         a[i]:=a[j];
        a[j]:=t;
      end;
end;

begin
find:=false;
p:=0;
q:=0;
j:=1;
 assignfile(fin,'box.in');
 assignfile(fout,'box.out');
 reset(FIN);
 REWRITE(FOUT);
 for i:=1 to 6 do
 begin
  readln(fin,v[i].w,v[i].h);
  if v[i].w=v[i].h then q:=8;
 end;

     for i:=1 to 6 do begin
       a[j]:=v[i].w;  inc(j);
       a[j]:=v[i].h; inc(j);
       end;
     sort;

    if q=8 then begin
                if ((a[1]=a[8]) and (a[9]=a[12])) or ((a[1]=a[4]) and (a[5]=a[12])) then
                find:=true
                else find:=false;
               end
      else
    if  (a[1]=a[4]) and (a[5]=a[8]) and (a[9]=a[12]) then    find:=true
    else find:=false;


 if  find then writeln(fout,'POSSIBLE') else writeln(fout,'IMPOSSIBLE');
 closefile(fin);
 closefile(fout);

end.
