program BBB___;
{$APPTYPE CONSOLE}
uses
  SysUtils;

const _NAME='box';
var w, h:array[1..6] of Int64;
    q: array[1..12] of Int64;
    p, i, j: Integer;
    fl: Boolean;

procedure Input;
var F: Text;
begin
  Assign(F, _NAME+'.in');
  Reset(F);
  for i:=1 to 6 do begin
    ReadLn(F, w[i], h[i]);
    q[i*2-1]:=w[i]; q[i*2]:=h[i];
  end;
  Close(F);
end; // Input

procedure Output;
var F: Text;
begin
  Assign(F, _NAME+'.out');
  ReWrite(F);
  if fl then WriteLn(F, 'POSSIBLE') else WriteLn(F, 'IMPOSSIBLE');
  Close(F);
end; // Output


begin
  Input;
  for i:=1 to 6 do begin
    if (w[i]=-1) or (h[i]=-1) then Continue;
    for j:=1 to 6 do begin
      if (i=j) or (w[j]=-1) or (h[j]=-1) then Continue;
      if (w[i]=w[j]) and (h[i]=h[j]) then begin
        w[i]:=-1; w[j]:=-1;
        h[i]:=-1; h[j]:=-1;
        Break;
      end;
      if (w[i]=h[j]) and (h[i]=w[j]) then begin
        w[i]:=-1; w[j]:=-1;
        h[i]:=-1; h[j]:=-1;
        Break;
      end;
    end;
  end;

  fl:=True;
  for i:=1 to 6 do
    if (w[i]<>-1) or (h[i]<>-1) then begin
      fl:=False;
      Output;
      Exit;
    end;

  for i:=1 to 12 do begin
    p:=0;
    for j:=1 to 12 do begin
      if q[i]=q[j] then p:=p+1;
    end;
    if p mod 4<>0 then begin
      fl:=False;
      Break;
    end;
  end;

  Output;
end.
