var
  cnt, j, i, n, aa, bb : longint;
  a1, b1, a, b : array [1..6] of longint;
  w : array [1..12] of longint;
  f, f2 : array [1..6] of boolean;
  ok : boolean;

procedure swap(var a,b:longint);
var c:longint;
begin
  c:=a;
  a:=b;
  b:=c;
end;

function get(i : longint) : longint;
var j:longint;
begin
  get := -1;
  for j := 1 to 6 do
    if f[j] = false then
      if i <> j then
        if ((a[i] = a[j]) and (b[i] = b[j])) or
           ((a[i] = b[j]) and (b[i] = a[j])) then
         begin
           get := j;
           exit;
         end;
end;

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

  fillchar(f, sizeof(f), false);
  n := 0;
  cnt := 0;
  ok := true;
  for i := 1 to 6 do
  begin
    read(aa, bb);
    a[i] := aa;
    b[i] := bb;
  end;
  cnt := 0;
  fillchar(f2, sizeof(f2), true);

  for i := 1 to 6 do
    if f[i] = false then
    begin
      j := get(i);
      if j = -1 then
      begin
        ok := false;
        break;
      end;
      f[j] := true;
      f[i] := true;
      f2[i] := false;
      inc(cnt);
    end;
  if cnt <> 3 then ok := false;
  if ok then
  begin
    j:=0;
    for i := 1 to 6 do
      if f2[i] = false then
      begin
        inc(j);
        a1[j] := a[i];
        b1[j] := b[i];
      end;
    if (a1[1] = a1[2]) and (b1[1] = b1[3]) and (b1[2]=a1[3]) then
      ok:=true;
    swap(a1[2],b1[2]);
    if (a1[1] = a1[2]) and (b1[1] = b1[3]) and (b1[2]=a1[3]) then
      ok:=true;
    swap(a1[3],b1[3]);
    if (a1[1] = a1[2]) and (b1[1] = b1[3]) and (b1[2]=a1[3]) then
      ok:=true;
    swap(a1[2],b1[2]);
    if (a1[1] = a1[2]) and (b1[1] = b1[3]) and (b1[2]=a1[3]) then
      ok:=true;
  end;
  if ok then write('POSSIBLE') else write('IMPOSSIBLE');

  close(input);
  close(output);
end.