program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
f,f1:text;
pos:boolean;
c,h1,h2,h3,w1,w2,w3,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6:integer;
procedure set_next(h,w:integer);
begin
if (h1=-1) then
begin
h1 := h;
w1 := w;
end
else
begin
 if (h2=-1) then
 begin
	h2 := h;
	w2 := w;
 end
 else
 begin
  if (h3=-1) then
  begin
  h3 := h;
  w3:=w;
  end;
  end;
end;
end;
procedure pose;
begin
if((h1=-1)or(h2=-1)or(h3=-1))then
begin
pos:=false;
end
else
begin
        if (h1=h2)then
        begin
        if ((w1=h3) and (w2=w3)) or ((w1=w3) or (w2=h3)) then pos:=true else pos:=false;
        end
        else
        begin
                if (h1=w2) then
                begin
                        if ((w1=h3) and (h2=w3)) or ((w1=w3) or (h2=h3)) then pos:=true else pos:=false;
                end
        end;
end;
end;
procedure swap(a,b:integer);
var c:integer;
begin
if (b<a) then
begin
c:=a;
a:=b;
b:=c;
end;
end;

begin
h1 := -1;
h2 := -1;
h3 := -1;
w1 := -1;
w2 := -1;
w3 := -1;
assign(f,'box.in');
reset(f);
read(f,a1);
readln(f,b1);
read(f,a2);
readln(f,b2);
read(f,a3);
readln(f,b3);
read(f,a4);
readln(f,b4);
read(f,a5);
readln(f,b5);
read(f,a6);
readln(f,b6);
close(f);
  if a1<b1 then
  begin
  c:=a1;
  a1:=b1;
  b1:=c;
  end;
  if a2<b2 then
  begin
  c:=a2;
  a2:=b2;
  b2:=c;
  end;
  if a3<b3 then
  begin
  c:=a3;
  a3:=b3;
  b3:=c;
  end;
  if a4<b4 then
  begin
  c:=a4;
  a4:=b4;
  b4:=c;
  end;
  if a5<b5 then
  begin
  c:=a5;
  a5:=b5;
  b5:=c;
  end;
  if a6<b6 then
  begin
  c:=a6;
  a6:=b6;
  b6:=c;
  end;


if((a1=a2) and (b1=b2)) then
begin
set_next(a1,b1);
a2 := -1;
b2 := -1;
end;
if((a1=a3) and (b1=b3)) then
begin
set_next(a1,b1);
a3 := -1;
b3 := -1;
end;
if((a1=a4) and (b1=b4)) then
begin
set_next(a1,b1);
a4 := -1;
b4 := -1;
end;
if((a1=a5) and (b1=b5)) then
begin
set_next(a1,b1);
a5 := -1;
b5 := -1;
end;
if((a1=a6) and (b1=b6)) then
begin
set_next(a1,b1);
a6 := -1;
b6 := -1;
end;
if((a2=a3) and (b2=b3) and (a2<>-1)) then
begin
set_next(a2,b2);
a3 := -1;
b3 := -1;
end;
if((a2=a4) and (b2=b4) and (a2<>-1)) then
begin
set_next(a2,b2);
a4 := -1;
b4 := -1;
end;
if((a2=a5) and (b2=b5) and (a2<>-1)) then
begin
set_next(a2,b2);
a5 := -1;
b5 := -1;
end;
if((a2=a6) and (b2=b6) and (a2<>-1)) then
begin
set_next(a2,b2);
a6 := -1;
b6 := -1;
end;
if((a3=a4) and (b3=b4) and (a3<>-1)) then
begin
set_next(a3,b3);
a4 := -1;
b4 := -1;
end;
if((a3=a5) and (b3=b5) and (a3<>-1)) then
begin
set_next(a3,b3);
a5 := -1;
b5 := -1;
end;
if((a3=a6) and (b3=b6) and (a3<>-1)) then
begin
set_next(a3,b3);
a6 := -1;
b6 := -1;
end;
if((a4=a5) and (b4=b5) and (a4<>-1)) then
begin
set_next(a4,b4);
a5 := -1;
b5 := -1;
end;
if((a4=a6) and (b4=b6) and (a4<>-1)) then
begin
set_next(a4,b4);
a6 := -1;
b6 := -1;
end;
if((a5=a6) and (b5=b6) and (a5<>-1)) then
begin
set_next(a5,b5);
a6 := -1;
b6 := -1;
end;
pose();

assign(f1,'box.out');
rewrite(f1);
if pos then write(f1,'POSSIBLE') ELSE write(f1,'IMPOSSIBLE');
close(f1);



end.
