program box;
const
 n=6;
type
 tmas=array[1..n,1..2] of longint;
 tprov=array[1..3] of boolean;
var
 a,b:tmas;
 p:array[1..n] of boolean;
 pp:tprov;
 k,k1,k2,i,j,m:longint;
 flag:boolean;
 
begin
  assign(input,'box.in');
  reset(input);
  assign(output,'box.out');
  rewrite(output);
  for i:=1 to 6 do readln(a[i,1],a[i,2]);
  k:=0;
  fillchar(p,sizeof(p),true);
  for i:=1 to n do if p[i] then
  begin
    for j:=i+1 to n do if p[j] then
    begin
      if ((a[i,1]=a[j,1]) and (a[i,2]=a[j,2]))
      or ((a[i,1]=a[j,2]) and (a[i,2]=a[j,1])) then
      begin
        inc(k);
        p[j]:=false;
        break;
      end;
    end;
  end;
  if k<>3 then
  begin
    writeln('IMPOSSIBLE');
    close(output);
    halt(0);
  end;

  for i:=1 to n do if p[i] then
  begin
    inc(m);
    b[m]:=a[i];
  end;

  fillchar(pp,sizeof(pp),true);
  pp[1]:=false;
  flag:=false;

  k1:=0;
  if (b[1,2]=b[2,1]) and (b[2,2]=b[3,1]) and (b[3,2]=b[1,1])
  or (b[1,1]=b[2,1]) and (b[2,2]=b[3,1]) and (b[3,2]=b[1,2])
  or (b[1,2]=b[2,2]) and (b[2,1]=b[3,1]) and (b[3,2]=b[1,1])
  or (b[1,2]=b[2,1]) and (b[2,2]=b[3,2]) and (b[3,1]=b[1,1])
  or (b[1,1]=b[2,2]) and (b[2,1]=b[3,1]) and (b[3,2]=b[1,2])
  or (b[1,1]=b[2,1]) and (b[2,2]=b[3,2]) and (b[3,1]=b[1,2])
  or (b[1,2]=b[2,2]) and (b[2,1]=b[3,2]) and (b[3,1]=b[1,1])
  or (b[1,1]=b[2,2]) and (b[2,1]=b[3,2]) and (b[3,1]=b[1,2]) then flag:=true;


  if k1=6 then flag:=true;

  if flag then
  begin
    writeln('POSSIBLE');
    close(output);
    halt(0);
  end else
  begin
    writeln('IMPOSSIBLE');
    close(output);
    halt(0);  
  end;

  close(input);
  close(output);

end.
