program b;

{$APPTYPE CONSOLE}

{$DEFINE DEBUfxgjG}

uses
  SysUtils;
const
  TaskName = 'box';


var
  i, j, k, n : Integer;
  P : array[1 .. 6, 1 .. 2] of Integer;
  Ans : boolean;

procedure Solve();
  var
    i, j, k, n : Integer;
  begin
    for i := 1 to 6 do
      if P[i,1] < P[i,2]
        then
          begin
            k := P[i,2];
            P[i,2] := P[i,1];
            P[i,1] := k;
          end;
    for i := 1 to 6 do
    for j := (i+1) to 6 do
      if not((P[i,1] > P[j,1]) or ((P[i,1] = P[j,1]) and (P[i,2] > P[j,2])))
        then
          begin
            k := P[j,1];
            P[j,1] := P[i,1];
            P[i,1] := k;
            k := P[j,2];
            P[j,2] := P[i,2];
            P[i,2] := k;
          end;
    Ans := (P[1,1]=P[2,1]) and (P[1,2]=P[2,2])
        and(P[3,1]=P[4,1]) and (P[3,2]=P[4,2])
        and(P[5,1]=P[6,1]) and (P[5,2]=P[6,2]);
    Ans := Ans and
        (P[1,1]=P[3,1]) and
        (P[3,2]=P[5,2]) and
        (P[1,2]=P[5,1]);


  end;

begin
{$IFNDEF DEBUG}
  Assign( input, TaskName + '.in' );
  Assign( output, TaskName + '.out' );
  Reset(input);
  Rewrite(output);
{$ENDIF}

  for i := 1 to 6 do
    ReadLn(P[i,1], P[i,2]);

  Solve();

  if Ans
    then
      writeln('POSSIBLE')
    else
      writeln('IMPOSSIBLE');

{$IFNDEF DEBUG}
  Close(input);
  Close(output);
{$ELSE}
  ReadLn;
{$ENDIF}
end.
