program Project1;

{$APPTYPE CONSOLE}
  type box=record h,v:integer;end;
 var
a: array [1..6] of box;

 temp,j,i:integer;
 fi,fo:text;
 f:boolean;
 begin
assign(fi,'box.in');
reset(fi);
for i:=1 to 6 do
begin
readln(fi,a[i].h,a[i].v);
if a[i].h>a[i].v then begin temp:=a[i].v;a[i].v:=a[i].h;a[i].h:=temp;end;
end;
close(fi);
f:=true;
for i:=2 to 6 do
if ((a[i].h<>a[1].h) and (a[i].v<>a[1].v)) or (a[i].h=a[1].v) then break;
if i=7 then f:=false;

for i:=1 to 5 do
begin
if a[i].h=0 then continue;
for j:= i+1 to 6 do
begin
if (a[i].h=a[j].h) and (a[i].v=a[j].v) then
begin a[i].h:=0;a[j].h:=0;a[i].v:=0;a[j].v:=0; break; end
end;
if j=7 then f:=false;
end;

assign(fo,'box.out');
rewrite(fo);
if f then writeln(fo,'POSSIBLE')
else writeln(fo,'IMPOSSIBLE');
//for i:=1 to 6 do
//writeln(fo,a[i].h,' ',a[i].v);
close(fo);

end.
