const
      inp='box.in';
      outt='box.out';

 var
      a:array[1..6,1..2] of longint;
      b:Array[1..6] of boolean;
      c:Array[1..6] of longint;


procedure readdata;
 var
      i:integer;

begin
   assign(input,inp);
    reset(input);
     for i:=1 to 6 do read(a[i,1],a[i,2]);
   close(input);
end;

procedure solve;
 var
      i,j:longint;

begin
  fillchar(b,sizeof(b),true);
  fillchar(c,sizeof(c),0);
  for i:=1 to 6 do
   if b[i] then
   begin
     for j:=i+1 to 6 do
      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])))and(b[j]) then
      begin
        b[j]:=false;
        inc(c[i]);
        b[i]:=false;
        break;
      end;
   end;
end;

procedure writedata;
 var
     i,k:longint;
begin
  assigN(output,outt);
   rewrite(output);
     k:=0;
     for i:=1 to 6 do
      if c[i]=1 then inc(k);
      if k=3 then  writeln('POSSIBLE')
             else writeln('IMPOSSIBLE');
  closE(output);
end;

begin
  readdata;
   solve;
  writedata;
end.
