Program kubik;
{$APPTYPE CONSOLE}
uses
  SysUtils;

var a,b:array[1..6] of integer;
    bool:array[1..6] of boolean;
i,j,s,kub:integer;
begin
assign(input,'box.in');
assign(output,'box.out');
reset(input);
rewrite(output);
s:=0;
for i:=1 to 6 do
 begin
  readln(a[i],b[i]);
  bool[i]:=true;
 end;
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]))) and (bool[i] or bool[j])then
          begin
            bool[i]:=false;
            bool[j]:=false;
          end;
     end;
for i:=1 to 6 do
  if not bool[i] then inc(s);
kub:=0;
for i:=1 to 6 do
    if (a[1]=a[i]) and (a[1]=b[i]) then inc(kub);
if (s=6) and (kub<>6) then write('POSSIBLE')
       else write('IMPOSSIBLE');
close(input);
close(output);
end.
