{$apptype console}

program box;

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


type
                int=longint;

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

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

  for i:=1 to n do if w[i]>h[i] then
   begin g:=w[i]; w[i]:=h[i]; h[i]:=g; end;

  for i:=1 to n-1 do
   for j:=i+1 to n do
    if w[i]>w[j] then
     begin
      g:=w[i]; w[i]:=w[j]; w[j]:=g;
      g:=h[i]; h[i]:=h[j]; h[j]:=g;
     end;

  for i:=1 to n-1 do
   for j:=i+1 to n do
    if w[i]=w[j] then 
    if (h[i]>h[j])then
     begin
      g:=h[i];
      h[i]:=h[j];
      h[j]:=g;
     end;

flag:=true;
  for i:=0 to 2 do
  if (w[2*i+1]<>w[2*i+2])or(h[2*i+1]<>h[2*i+2]) then flag:=false;
  close(input );
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;
  print;
end.
