program b;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  F : Text;
  C, i, j, k : Integer;
  A : Array [1..6, 1..2] of Integer;
  Bs : Array [1..3, 1..2] of Integer;
  Flag : Boolean;
begin
  Assign(F, 'box.in');
  Reset(F);
  For i := 1 to 6 do begin
    Read(F, A[i, 1], A[i, 2]);
  end;
  Close(F);
  c := 1;
  for i := 1 to 6 do begin
    if A[i, 1] > 0 then begin
      for j := i + 1 to 6 do 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
          Bs[c, 1] := A[i, 1];
          Bs[c, 2] := A[i, 2];
          A[j, 1] := -1;
          A[i, 1] := -1;
          inc(C);
        end;
      end;
    end;
  end;

  if (C < 4) then flag := False else Flag := True;



  Assign(F, 'box.out');
  ReWrite(F);

  if Flag then begin
    k := Bs[1, 1];
    j := Bs[1, 2];
    flag := False;

    if ( ((k = Bs[2, 1]) and (j = Bs[3, 1])) and (Bs[2, 2] = Bs[3, 2])) then Flag := True;
    if ( ((k = Bs[2, 1]) and (j = Bs[3, 2])) and (Bs[2, 2] = Bs[3, 1])) then Flag := True;
    if ( ((k = Bs[2, 2]) and (j = Bs[3, 1])) and (Bs[2, 1] = Bs[3, 2])) then Flag := True;
    if ( ((k = Bs[2, 2]) and (j = Bs[3, 2])) and (Bs[2, 1] = Bs[3, 1])) then Flag := True;

{    if ( ((k = Bs[3, 1]) and (j = Bs[2, 1])) and (Bs[3, 2] = Bs[2, 2])) then Flag := True;
    if ( ((k = Bs[3, 1]) and (j = Bs[2, 2])) and (Bs[3, 2] = Bs[2, 1])) then Flag := True;
    if ( ((k = Bs[3, 2]) and (j = Bs[2, 1])) and (Bs[3, 1] = Bs[2, 2])) then Flag := True;
    if ( ((k = Bs[3, 2]) and (j = Bs[2, 2])) and (Bs[3, 1] = Bs[2, 1])) then Flag := True;
}
    if ( ((j = Bs[2, 1]) and (k = Bs[3, 1])) and (Bs[2, 2] = Bs[3, 2])) then Flag := True;
    if ( ((j = Bs[2, 1]) and (k = Bs[3, 2])) and (Bs[2, 2] = Bs[3, 1])) then Flag := True;
    if ( ((j = Bs[2, 2]) and (k = Bs[3, 1])) and (Bs[2, 1] = Bs[3, 2])) then Flag := True;
    if ( ((j = Bs[2, 2]) and (k = Bs[3, 2])) and (Bs[2, 1] = Bs[3, 1])) then Flag := True;


  end;

  if Flag then Write(F, 'POSSIBLE') else Write(F, 'IMPOSSIBLE');
{  For I := 1 to 3 do begin
  writeln (F, Bs[i, 1], ' = ', Bs[i, 2]);
  end;}

  Close(F);
end.
