{$APPTYPE CONSOLE}
{$O-,R+,Q+}
uses
  Sysutils, Math;
const
  inf = 1000000000;
  eps = 1e-9;
  base = 10;
type
  int = longint;
  bool = boolean;
  real = extended;
var
  i, j, k, n, m: int;
  a, b, aa, bb: array[1..6] of longint;
  w, d: array[1..6] of boolean;
  flag, res: boolean;
  t: int;
  
procedure ex(r: boolean);
begin
  if r then
  begin
    write('POSSIBLE');
  end else begin
    write('IMPOSSIBLE');
  end;
  halt(0);
end;

begin
  assign(input, 'box.in');
  reset(input);
  assign(output, 'box.out');
  rewrite(output);
  read(a[1], b[1]);
  read(a[2], b[2]);
  read(a[3], b[3]);
  read(a[4], b[4]);
  read(a[5], b[5]);
  read(a[6], b[6]);
  for i := 1 to 6 do
  begin
    w[i] := false;
    d[i] := false;
  end;
  i := 1;
  n := 6;
  while i <= n do
  begin
    if not d[i] then
    begin
      j := i + 1;
      flag := false;
      while j <= n do
      begin
        if not d[j] then
        begin
          if ((a[i] = a[j]) and (b[i] = b[j])) or ((a[i] = b[j]) and (b[i] = a[j])) then
          begin
            w[i] := true;
            w[j] := true;
            d[j] := true;
            flag := true;
            break;
          end;
        end;
        inc(j);
      end;
      if not flag then
      begin
        ex(false);
      end;
    end;
    inc(i);
  end;
  k := 0;
  for i := 1 to 6 do
  begin
    if not d[i] then
    begin
      inc(k);
      aa[k] := a[i];
      bb[k] := b[i];
    end;
  end;
  if k <> 3 then
  begin
    ex(false);
  end;
  for i := 1 to 3 do
  begin
    if aa[i] >= bb[i] then
    begin
      t := aa[i];
      aa[i] := bb[i];
      bb[i] := t;
    end;
  end;
  res := false;
  if (aa[1] = aa[2]) then
  begin
    if (bb[1] = aa[3]) and (bb[2] = bb[3]) then
    begin
      res := true;
    end;
    if (bb[1] = bb[3]) and (bb[2] = aa[3]) then
    begin
      res := true;
    end;
  end;
  if aa[1] = aa[3] then
  begin
    if (bb[1] = aa[2]) and (bb[3] = bb[2]) then
    begin
      res := true;
    end;
    if (bb[1] = bb[2]) and (bb[3] = aa[2]) then
    begin
      res := true;
    end;
  end;
  if (aa[2] = aa[3]) then
  begin
    if (bb[2] = aa[1]) and (bb[3] = bb[1]) then
    begin
      res := true;
    end;
    if (bb[2] = bb[1]) and (bb[3] = aa[1]) then
    begin
      res := true;
    end;
  end;
  ex(res);
  close(input);
  close(output);
end.
//Leafy tops of root vegetables strike back...