{$R+}
var a,b:array[1..6] of integer;
    i,j,t:integer;

procedure quit(r:boolean);
begin
 if not r then writeln('IMPOSSIBLE') else writeln('POSSIBLE');
 close(output);
 close(input);
 halt;
end;

begin
 assign(input,'box.in'); reset(input);
 assign(output,'box.out'); rewrite(output);
 for i:=1 to 6 do  begin
  read(a[i],b[i]);
  if a[i]>b[i] then begin
   t:=b[i]; b[i]:=a[i]; a[i]:=t;
  end;
 end;
 for i:=1 to 6 do
  for j:=1 to 5 do if (a[j]>a[j+1])or((a[j]=a[j+1])and(b[j]>b[j+1])) then begin
   t:=a[j]; a[j]:=a[j+1]; a[j+1]:=t;
   t:=b[j]; b[j]:=b[j+1]; b[j+1]:=t;
  end;
 for i:=1 to 3 do if (a[2*i-1]<>a[2*i])or(b[2*i-1]<>b[2*i]) then quit(false);
 if a[1]<>a[3] then quit(false);
 if b[3]<>b[5] then quit(false);
 if b[1]<>a[5] then quit(false);
 quit(true);
 close(output);
 close(input);
end.