{$apptype console}

var
  w, h: array[1..6] of integer;
  mask: array[1..6] of boolean;
  flag: boolean;
  i, j, k: integer;
  
procedure swap(var a, b: integer);
var
  c: integer;
begin
  c := a;
  a := b;
  b := c;
end;

procedure nosol;
begin
  writeln('IMPOSSIBLE');
  halt;
end;

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

  for i := 1 to 6 do begin
    read(w[i], h[i]);
    if w[i] > h[i] then
      swap(w[i], h[i]);
  end;

  fillchar(mask, sizeof(mask), true);
  k := 0;
  for i := 1 to 6 do
    if mask[i] then begin
      mask[i] := false;
      inc(k);
      w[k] := w[i];
      h[k] := h[i];
      j := i + 1;
      while (j <= 6) do begin
        if mask[j] and ((w[i] = w[j]) and (h[i] = h[j])) then
          break;
        inc(j);
      end;
      if j > 6 then
        nosol;
      mask[j] := false;
    end;

  if k <> 3 then
    nosol;

  flag :=
   ((h[1] = h[2]) and (w[2] = h[3]) and (w[3] = w[1])) or
   ((h[1] = h[2]) and (w[2] = w[3]) and (h[3] = w[1])) or
   ((h[1] = w[2]) and (h[2] = h[3]) and (w[3] = w[1])) or
   ((h[1] = w[2]) and (h[2] = w[3]) and (h[3] = w[1]));

  swap(h[2], h[3]);
  swap(w[2], w[3]);

  flag := flag or 
   ((h[1] = h[2]) and (w[2] = h[3]) and (w[3] = w[1])) or
   ((h[1] = h[2]) and (w[2] = w[3]) and (h[3] = w[1])) or
   ((h[1] = w[2]) and (h[2] = h[3]) and (w[3] = w[1])) or
   ((h[1] = w[2]) and (h[2] = w[3]) and (h[3] = w[1]));

  if not flag then
    nosol;

  writeln('POSSIBLE');
end.