program BBox;

const
 imp='IMPOSSIBLE';
 pOS='POSSIBLE';

{$APPTYPE CONSOLE}

var
 i,k,j,l,m,n:integer;
 bw,bh : array [0..6] of integer;
 label ex;

function matched(bn:byte; sl:integer):boolean;
begin
 matched:=true;
 if bw[bn]=sl then exit;
 if bh[bn]=sl then
  begin
   m:=bw[bn];
   bw[bn]:=bh[bn];
   bh[bn]:=m;
   exit;
  end;

  matched:=false;
end;

begin
 assign(input,'box.in');
 assign(output,'box.out');
 reset(input);
 rewrite(output);
 for i:= 1 to 6 do begin
  readln(bw[i],bh[i]);
  if bw[i]>bh[i] then begin
   m:=bh[i];
   bh[i]:=bw[i];
   bw[i]:=m;
  end;
 end;

  for i:=2 to 6 do
   for k:=i downto 2 do
    begin
     if (bw[k]<bw[k-1]) or ((bw[k]=bw[k-1]) and (bh[k]<bh[k-1])) then
      begin
       n:=bw[k];m:=bh[k];
       bw[k]:=bw[k-1]; bh[k]:=bh[k-1];
       bw[k-1]:=n;bh[k-1]:=m;
      end;
    end;



{    for i:=1 to 6 do
      writeln(bw[i], ' ',bh[i]);}

  for i:=1 to 3 do
   begin
    k:=i*2-1;
    l:=i*2;
    if not((bw[k]=bw[l]) and (bh[k]=bh[l])) then
     begin
      writeln(IMP);
      goto ex;
     end;
   end;

   bw[2]:=bw[4];   bh[2]:=bh[4];
   bw[3]:=bw[6];   bh[3]:=bh[6];

   if matched(2,bw[1]) and matched(3,bh[1]) then
    begin
     if (bh[2]=bh[3]) then
      begin
       writeln(pos);
       goto ex;
      end;
    end;

   if matched(3,bw[1]) and matched(2,bh[1]) then
    begin
     if (bh[2]=bh[3]) then
      begin
       writeln(pos);
       goto ex;
      end;
    end;
  writeln(imp);
ex:
 close(input);
 close(output);
end.
