program d;

{$APPTYPE CONSOLE}
var a,b:array[1..6] of integer;
i,j,s:integer;
begin
assign(input,'');
assign(output,'');
reset(input);
rewrite(output);
s:=0;
for i:=1 to 6 do
read(a[i],b[i]);
for i:=1 to 5 do
  for j:=i+1 to 6 do
     begin
       if a[i]=a[j] and b[i]=b[j] or a[i]=b[j] and b[i]=a[j] then inc(s);
     end;
if s=6 then write('POSSIBLE')
else write('IMPOSSIBLE');
close(input);
close(output);
end.
