program Task_B;

{$APPTYPE CONSOLE}

var
  w, h: array[1..6] of Integer;
  IsPair: array[1..6] of Boolean;
  NPair: array[1..3] of Integer;
  PairCount: Integer;
  i, j: Integer;

begin
  Assign(input, 'box.in');
  Reset(input);
  Assign(output, 'box.out');
  ReWrite(output);
  for i := 1 to 6 do
    begin
      ReadLn(w[i], h[i]);
      IsPair[i] := False;
    end;
  PairCount := 0;
  for i := 1 to 6 do
    if not IsPair[i] then
      for j := i + 1 to 6 do
        if not IsPair[j] then
          begin
            if ((w[i] = w[j]) and (h[i] = h[j])) or ((w[i] = h[j]) and (h[i] = w[j])) then
              begin
                Inc(PairCount);
                NPair[PairCount] := i;
                IsPair[i] := True;
                IsPair[j] := True;
                Break;
              end;
          end;
  if PairCount = 3 then
    begin
      if ((w[NPair[1]] = w[NPair[2]]) and (h[NPair[1]] = w[NPair[3]]) and (h[NPair[2]] = h[NPair[3]])) or
         ((w[NPair[1]] = w[NPair[2]]) and (h[NPair[1]] = h[NPair[3]]) and (h[NPair[2]] = w[NPair[3]])) or
         ((w[NPair[1]] = h[NPair[2]]) and (h[NPair[1]] = w[NPair[3]]) and (w[NPair[2]] = h[NPair[3]])) or
         ((w[NPair[1]] = h[NPair[2]]) and (h[NPair[1]] = h[NPair[3]]) and (w[NPair[2]] = w[NPair[3]])) or
         ((w[NPair[1]] = w[NPair[3]]) and (h[NPair[1]] = w[NPair[2]]) and (h[NPair[3]] = h[NPair[2]])) or
         ((w[NPair[1]] = w[NPair[3]]) and (h[NPair[1]] = h[NPair[2]]) and (h[NPair[3]] = w[NPair[2]])) or
         ((w[NPair[1]] = h[NPair[3]]) and (h[NPair[1]] = w[NPair[2]]) and (w[NPair[3]] = h[NPair[2]])) or
         ((w[NPair[1]] = h[NPair[3]]) and (h[NPair[1]] = h[NPair[2]]) and (w[NPair[3]] = w[NPair[2]])) then
        WriteLn('POSSIBLE')
      else
        WriteLn('IMPOSSIBLE');
    end
  else
    WriteLn('IMPOSSIBLE');
end.
