var a:array[1..6,1..2] of integer;
    k,i,j:integer;
    b:array[1..3] of byte;
    c:set of byte;
begin
  assign(input,'box.in');
  reset(input);
  assign(output,'box.out');
  rewrite(output);
  for k:=1 to 6 do
  begin
    readln(i,j);
    if (i<=j) then begin a[k,1]:=i;a[k,2]:=j;end;
    if (i>j) then begin a[k,2]:=i;a[k,1]:=j;end;
  end;
  c:=[];k:=0;
  for i:=1 to 5 do
  for j:=i+1 to 6 do
  if not (j in c) and not (i in c) and (a[i,1]=a[j,1]) and (a[i,2]=a[j,2]) then
  begin
    c:=c+[i]+[j];
    inc(k);
    if (k<4) then b[k]:=i;
  end;
  if (k<>3) then write('IMPOSSIBLE') else
  begin
    if (a[b[1],1]=a[b[2],1]) then
    begin
      if ((a[b[3],1]=a[b[1],2]) and (a[b[3],2]=a[b[2],2])) or
       ((a[b[3],1]=a[b[2],2]) and (a[b[3],2]=a[b[1],2])) then write('POSSIBLE') else write('IMPOSSIBLE');
    end else
    if (a[b[1],1]=a[b[3],1]) then
    begin
      if ((a[b[2],1]=a[b[1],2]) and (a[b[2],2]=a[b[3],2])) or
       ((a[b[2],1]=a[b[3],2]) and (a[b[2],2]=a[b[1],2])) then write('POSSIBLE') else write('IMPOSSIBLE');
    end else
    if (a[b[2],1]=a[b[3],1]) then
    begin
      if ((a[b[1],1]=a[b[2],2]) and (a[b[1],2]=a[b[3],2])) or
       ((a[b[1],1]=a[b[3],2]) and (a[b[1],2]=a[b[1],2])) then write('POSSIBLE') else write('IMPOSSIBLE');
    end else write('IMPOSSIBLE');
  end;
  close(input);
  close(output);
end.
