program Project2;

{$APPTYPE CONSOLE}

var a:array[1..6] of record
                        x,y:integer;
                        fl:boolean;
                      end;
    b:array[1..3] of record
                        x,y:integer;
                     end;
    i,j,k:integer;
    flag:boolean;

begin
  assign(input,'box.in');
  assign(output,'box.out');
  reset(input);
  rewrite(output);
  for i:=1 to 6 do begin
     readln(a[i].x,a[i].y);
     a[i].fl :=true;
  end;

  k:=0;
  for i:=1 to 6 do begin
     a[i].fl :=false;
     for j:=2 to 6 do begin
        if a[j].fl then begin
           if ((a[i].x=a[j].x) and (a[i].y=a[j].y)) or ((a[i].x=a[j].y) and (a[i].y=a[j].x)) then begin
              a[j].fl:=false;
              inc(k);
              b[k].x:=a[i].x;
              b[k].y:=a[i].y;
           end;
        end;
     end;
  end;

  if k<>3 then begin
     writeln('IMPOSSIBLE');
     close(input);
     close(output);
     halt (0);
  end;

  if (b[1].x=b[1].y) and (b[1].x=b[2].x) and (b[1].x=b[2].y) and (b[1].x=b[3].x) and (b[1].x=b[3].y) then begin
     writeln('POSSIBLE');
     close(input);
     close(output);
     halt (0);
  end;
  flag:=true;
  if (b[1].x=b[1].y) and (b[2].x=b[2].y) and (b[3].x=b[3].y) then begin
     writeln('IMPOSSIBLE');
     close(input);
     close(output);
     halt (0);
  end;
  if ((b[1].x=b[1].y) and (b[2].x<>b[2].y) and (b[3].x<>b[3].y)) or
     ((b[1].x=b[1].y) and (b[2].x<>b[2].y) and (b[3].x<>b[3].y)) or
     ((b[1].x=b[1].y) and (b[2].x<>b[2].y) and (b[3].x<>b[3].y)) then begin
     writeln('IMPOSSIBLE');
     close(input);
     close(output);
     halt (0);
  end;
  writeln('POSSIBLE');
  close(input);
  close(output);
end.
