program box;

var
  I, J, Pos: Integer;
  A, B, C, D: array[1..6] of Integer;
  Result: Boolean;

begin
  Assign(Input, 'box.in');
  Assign(Output, 'box.out');
  for I := 1 to 6 do
    Readln(A[I], B[I]);
  Pos := 0;
  for I := 1 to 6 do
    for J := I + 1 to 6 do
      if (A[I] > 0) and (A[J] > 0) and
         ((A[I] = A[J]) and (B[I] = B[J]) or (A[I] = B[J]) and (B[I] = A[J])) then
      begin
        Inc(Pos);
        C[Pos] := A[I];
        D[Pos] := B[I];
        A[I] := 0;
        A[J] := 0;
      end;
  Result := Pos = 3;
  if Result then
  begin
 {   if C[1] = C[2] then
    begin
      Result := (D[1] = C[3]) and (D[2] = D[3]) or
                (D[1] = D[3]) and (D[2] = C[3]);
    end
      else
      if C[1] = D[2] then
      begin
        Result := (D[1] = C[3]) and (C[2] = D[3]) or
                  (D[1] = D[3]) and (C[2] = C[3]);
      end
        else
        if C[2] = D[1] then
        begin
          Result := (C[1] = C[3]) and (D[2] = D[3]) or
                    (C[1] = D[3]) and (D[2] = C[3]);
        end
          else
          if D[1] = D[2] then
          begin
            Result := (C[1] = C[3]) and (C[2] = D[3]) or
                      (C[1] = D[3]) and (C[2] = C[3]);
          end
            else Result := False;}
    Result := (C[1] = C[2]) and ((D[1] = C[3]) and (D[2] = D[3]) or (D[1] = D[3]) and (D[2] = C[3])) or
              (C[1] = D[2]) and ((C[2] = C[3]) and (D[1] = D[3]) or (C[2] = D[3]) and (D[1] = C[3])) or
              (C[2] = D[1]) and ((C[1] = C[3]) and (D[2] = D[3]) or (C[1] = D[3]) and (D[2] = C[3])) or
              (D[1] = D[2]) and ((C[1] = C[3]) and (C[2] = D[3]) or (C[1] = D[3]) and (C[2] = C[3]));
  end;
  if Result then Writeln('POSSIBLE') else Writeln('IMPOSSIBLE');
end.
