program prB;

{$APPTYPE CONSOLE}

var A, B: array [1..6] of integer;
    i, tmp: integer;

 procedure sort;
   var i, j, t: integer;
  begin
   for i := 1 to 6 - 1 do
    for j := i + 1 to 6 do
     if (A[i] > A[j]) or
        ((A[i] = A[j]) and (B[i] > B[j])) then
       begin
        t := A[i];
        A[i] := A[j];
        A[j] := t;
        t := B[i];
        B[i] := B[j];
        B[j] := t;
       end;
  end;

begin
  assign(input, 'box.in');
  reset(input);
  assign(output, 'box.out');
  rewrite(output);

  for i:=1 to 6 do begin
    read(A[i], B[i]);
    if A[i]>B[i] then begin
      tmp:=A[i];
      A[i]:=B[i];
      B[i]:=tmp;
    end;
  end;


  Sort;

  if (A[1]=A[2]) and (B[1]=B[2]) and (A[3]=A[4]) and
     (B[3]=B[4]) and (A[5]=A[6]) and (B[5]=B[6]) then begin
    if ((((A[3]=A[1]) or (B[3]=A[1])) and ((A[5]=B[1]) or (B[5]=B[1]))) or
       (((A[5]=A[1]) or (B[5]=A[1])) and ((A[3]=B[1]) or (B[3]=B[1])))) and
       ((((A[1]=A[3]) or (B[1]=A[3])) and ((A[5]=B[3]) or (B[5]=B[3]))) or
       (((A[5]=A[3]) or (B[5]=A[3])) and ((A[1]=B[3]) or (B[1]=B[3])))) and
       ((((A[1]=A[5]) or (B[1]=A[5])) and ((A[3]=B[5]) or (B[3]=B[5]))) or
       (((A[3]=A[5]) or (B[3]=A[5])) and ((A[1]=B[5]) or (B[1]=B[5])))) then
       writeln('POSSIBLE') else writeln('IMPOSSIBLE');
  end else writeln('IMPOSSIBLE');
end.
