program ProblemB;

{$APPTYPE CONSOLE}

var
  i, j, count: integer;
  ws, hs: array [1..6] of integer;
  flag: boolean;

procedure swapi(var x, y: integer);
var
  t: integer;
begin
  t := x;
  x := y;
  y := t;
end;

function IsIn(v, n: integer): boolean;
var
  j: integer;
begin
  result := false;
  for j := 1 to n do
  if (v = ws[2 * j]) or (v = hs[2 * j]) then
  begin
    result := true;
    break;
  end;
end;

{function right(x1, y1, x2, y2, x3, y3: integer): boolean;
begin
  if (x1 = x2) and (y1 = y2) and (z1 = z2) then
    result := true
  else
    result := false;
end;}

begin
  assign(input, 'box.in');
  reset(input);
  assign(output, 'box.out');
  rewrite(output);
  for i := 1 to 6 do
  begin
    read(ws[i], hs[i]);
    if ws[i] < hs[i] then
      swapi(ws[i], hs[i]);
  end;
  for i := 1 to 5 do
  for j := i + 1 to 6 do
  if (ws[j] < ws[i]) or ((ws[i] = ws[j]) and (hs[j] < hs[i])) then
  begin
    swapi(ws[i], ws[j]);
    swapi(hs[i], hs[j]);
  end;
  flag := true;
  count := 0;
  for i := 1 to 3 do
  if (ws[2 * i] <> ws[2 * i - 1]) or (hs[2 * i] <> hs[2 * i - 1]) then
  begin
    flag := false;
    break;
  end else
  begin
    if not IsIn(ws[2 * i], i - 1) then
      inc(count);
    if (not IsIn(hs[2 * i], i - 1)) and (hs[2 * i] <> ws[2 * i]) then
      inc(count);
  end;
  if count > 3 then
    flag := false;
  if flag then
    write('POSSIBLE')
  else
    write('IMPOSSIBLE');
end.
