{$apptype console}

type
  TSize = record
    l, w: integer;
  end;
var
  sizes: array[1..6] of TSize;
  i, a, b, j, m: integer;
  t: TSize;
  f: boolean;
begin
  Assign(input, 'box.in');
  Assign(output, 'box.out');
  Reset(input);
  Rewrite(output);
  for i := 1 to 6 do begin
    Read(a, b);
    with sizes[i] do
      if (b > a) then begin
        l := b;
        w := a;
      end
      else begin
        l := a;
        w := b;
      end;
  end;
  for i := 1 to 5 do begin
    m := i;
    for j := i + 1 to 6 do
      if 
        (sizes[j].l > sizes[m].l) or 
        (sizes[j].l = sizes[m].l) and (sizes[j].w > sizes[m].w)
      then
        m := j;
    t := sizes[i];
    sizes[i] := sizes[m];
    sizes[m] := t;
  end;
  f :=
    (sizes[1].l = sizes[2].l) and (sizes[1].w = sizes[2].w) and
    (sizes[1].l = sizes[3].l) and (sizes[3].w = sizes[4].w) and
    (sizes[1].l = sizes[4].l) and
    (sizes[5].l = sizes[6].l) and (sizes[5].w = sizes[6].w) and
    (sizes[1].w = sizes[5].l) and (sizes[3].w = sizes[5].w);
  if f then
    Writeln('POSSIBLE')
  else
    Writeln('IMPOSSIBLE');
  Close(input);
  Close(output);
end.