{$Apptype console}
type
  R = record Max, Min: longInt;end;
var
  A: array [1..6] of R;
  T, P: LongInt;
  Q, W, E: LongInt;
  O: R;
  Fi, Fo: Text;
function Menshe(T, P: LongInt): Boolean;
begin
  Menshe := (A[T].Max < A[P].Max) or ((A[T].Max = A[P].Max) and (A[T].Min < A[P].Min))
end;
begin
  Assign(FI, 'box.in');
  Reset(FI);
  Assign(FO, 'box.out');
  Rewrite(FO);
  for T := 1 to 6 do
  begin
    Read(Fi, A[T].Min, A[T].Max);
    if A[T].Max > A[T].Min then
    begin
      P := A[T].Max;
      A[T].Max := A[T].Min;
      A[T].Min := P;
    end;
  end;
  for T := 1 to 6 do
  for P := 1 to 6 do
  if Menshe(T, P) then
  begin
    O := A[T];
    A[T] := A[P];
    A[P] := O;
  end;
  for T := 1 to 3 do
  if (A[T*2].Max <> A[T * 2 - 1].Max)or
  (A[T*2].Min <> A[T * 2 - 1].Min) then
  begin
    WriteLn(Fo, 'IMPOSSIBLE');
    Close(FO);
    Halt;
  end;
  for T := 1 to 3 do A[T] := A[T * 2 - 1];
{  for T := 1 to 3 do writeln(A[T].min,' ',A[T].Max);}
  for Q := 1 to 3 do
  for W := 1 to 3 do
  for E := 1 to 3 do
  if (Q <> W) and (W <> E) and (E <> Q) then
  if(A[Q].Min = A[E].Max)and(A[Q].Max = A[w].Max)and
  (A[W].Min = A[E].Min)then
  begin
    WriteLn(FO, 'POSSIBLE');
    Close(FO);
    Halt;
  end;
  WriteLn(FO, 'IMPOSSIBLE');
  Close(FI);
  Close(FO);
end.
