program Project1;
type
  B = record
    w,h: Integer;
    Ok: Boolean;
   end; 
var
  A: Array [1..6] of B;
  i,j,w,h: Integer;
  Yes: Boolean;


begin
  AssignFile(Input, 'box.in');
  Reset(Input);
  for i:=1 to 6 do
    Begin
      ReadLn(W,H);
      if w > h then
        Begin
          a[i].w:=w;
          a[i].h:=h;
        end
      else
        Begin
          a[i].w:=h;
          a[i].h:=w;
        end;
      A[i].Ok:=True;
    end;
  for i:=1 to 5 do
    for j:=i+1 to 6 do
      if A[i].Ok and A[j].Ok then
        if (A[i].w = A[j].w) and (A[i].h = A[j].h) then
          begin
            a[i].Ok:=false;
            a[j].Ok:=false;
          end;
  CloseFile(Input);


  AssignFile(Output, 'box.out');
  Rewrite(Output);

  Yes:=True;
  for i:=1 to 6 do
    if A[i].Ok then
      Yes:=False;
  if Yes then
    WriteLn('POSSIBLE')
  else
    WriteLn('IMPOSSIBLE');

  CloseFile(Output);
end.
