{$I-,Q-,R-,S-,D-,L-,O+}
{$I+,Q+,R+,S+,D+,L+,O-}
program B;
{$APPTYPE CONSOLE}
const
  inf = 'box.in';
  ouf = 'box.out';

type
  int = longint;

var
  h, w, u : array [0..6] of int;
  i, j, t, k, n, m : int;
  issol, flag : boolean;

function  max(a, b : int) : int;
begin
  max := a;
  if a < b then max := b;
end;

function  min(a, b : int) : int;
begin
  min := a;
  if a > b then min := b;
end;

procedure checkup;
begin
  if(h[1] = h[5])then begin
    if(h[3] = min(w[1], w[5]))and(w[3] = max(w[1], w[5]))then begin
      issol := true;
      exit;
    end;
  end else
  if(h[1] = h[3])then begin
    if(h[5] = min(w[1], w[3]))and(w[5] = max(w[1], w[3]))then begin
      issol := true;
      exit;
    end;
  end;
  if(h[3] = h[5])then begin
    if(h[1] = min(w[3], w[5]))and(w[1] = max(w[3], w[5]))then begin
      issol := true;
      exit;
    end;
  end;
end;

begin
  assign(input, inf);
  reset(input);
  for i := 1 to 6 do begin
    read(h[i], w[i]);
    if h[i] > w[i] then begin
      t := h[i];
      h[i] := w[i];
      w[i] := t;
    end;
  end;
  close(input);

  issol := true;
  for i := 1 to 5 do
    for j := i + 1 to 6 do
      if(h[i] > h[j])or
      ((h[i] = h[j])and(w[i] > w[j]))then begin
        t := h[i];
        h[i] := h[j];
        h[j] := t;
        t := w[i];
        w[i] := w[j];
        w[j] := t;
      end;

  issol := true;
  for i := 1 to 3 do
    if(h[i * 2] <> h[i * 2 - 1])
    or(w[i * 2] <> w[i * 2 - 1])then begin
      issol := false;
      break;
    end;

  if issol then begin
    issol := false;
    checkup;
  end;

  assign(output, ouf);
  rewrite(output);
  if issol then writeln('POSSIBLE') else writeln('IMPOSSIBLE');
  close(output);
end.
