{$apptype console}

program box;

const
                infile='box.in';
                outfile='box.out';
                n = 6;


type
                int=longint;

var w,h           :  array[1..6]of int;
        p       :array [1..6] of boolean;
    i,j,g  : int;
    flag:boolean;

procedure load;
var
        i:int;
begin
  assign(input,infile);
  reset(input);
  for i:=1 to n do begin
    readln(w[i],h[i]);
    if w[i]>h[i] then begin
      g:=w[i];
      w[i]:=h[i];
      h[i]:=g;
     end;
   end;
  close(input );
end;

procedure solve;
var
        i,j:int;
begin
  fillchar(p,sizeof(p),false);
  for i:=1 to n-1 do if not p[i] then
   for j:=i+1 to n do if(not p[j])and(i<>j)then
    if(w[i]=w[j])and(h[i]=h[j])then begin
      p[i]:=true;
      p[j]:=true;
     end;
  flag:=true;
  for i:=1 to n do if p[i]=false then flag:=false;
end;


procedure print;
var
        i:int;
begin
  assign(output,outfile);
  rewrite(output);
   if flag then writeln('POSSIBLE') else writeln('IMPOSSIBLE');
  close(output);
end;

begin
  load;
  solve;
  print;
end.
