program bb;

{$APPTYPE CONSOLE}

uses
  SysUtils;
label mmm,nnn,case1,case2,case3,ca11,case21,case311;
var f:text;
    f1:text;
    x:array[1..6] of integer;
    x1:array[1..3] of integer;
    y:array[1..6] of integer;
    y1:array[1..3] of integer;
    i,j,k:integer;
    hhhh:integer;
begin
assignfile(f,'box.in');
assignfile(f1,'box.out');
reset (f);
rewrite(f1);
for i:= 1 to 6 do begin
 read(f,x[i]);
 readln(f,y[i]);
 end;

k:=1;
for i := 1 to 5 do
if (x[i]<>0) and (y[i]<>0) then
for j := 1 to 6 do begin
 if i < j then begin
   if ((x[i]=x[j])and (y[i]=y[j])) or ((x[i]=y[j])and (y[i]=x[j])) then
      begin
        x1[k]:= x[i];
        y1[k]:=y[i];
        x[i]:=0;
        y[i]:=0;
        k:=k+1;
        if k >3 then goto mmm;
        end;
   end;
end;
mmm:
if (x1[1] <> y1[1]) and (x1[2] <> y1[2]) and (x1[3] <> y1[3]) then goto case1
else
goto case2;

case1:
if (x1[1]<>x1[2]) and (x1[1]<>y1[2]) and (x1[1]<>x1[3]) and (x1[1]<>y1[3]) then
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;
if (x1[1]=y1[2]) then begin
hhhh:=y1[2];
y1[2]:=x1[2];
x1[2]:=hhhh;
goto ca11;
end;
if x1[1]=x1[3] then begin
hhhh:=x1[2];
x1[2]:=x1[3];
x1[3]:=hhhh;
hhhh:=y1[2];
y1[2]:=y1[3];
y1[3]:=hhhh;
goto ca11;
end;
if x1[1] = y1[3] then
begin
hhhh:=y1[3];
y1[3]:=x1[2];
x1[2]:=hhhh;
hhhh:=y1[2];
y1[2]:=x1[3];
x1[3]:=hhhh;
goto ca11;
end;
ca11:

if ((y1[1]=x1[3]) and (y1[2]=y1[3])) or ((y1[1]=y1[3]) and (y1[2]=x1[3])) then
 begin
write(f1,'POSSIBLE');
goto nnn;
end
else
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;

case2:
  if (x1[1] = y1[1]) and (x1[2] <> y1[2]) and (x1[3] <> y1[3]) then goto case21;
  if (x1[1] <> y1[1]) and (x1[2] = y1[2]) and (x1[3] <> y1[3]) then
  begin
  hhhh:=x1[2];
x1[2]:=x1[1];
x1[1]:=hhhh;
  hhhh:=y1[2];
y1[2]:=y1[1];
y1[1]:=hhhh;
goto case21;
end;
if (x1[1] <> y1[1]) and (x1[2] <> y1[2]) and (x1[3] = y1[3]) then
begin
hhhh:=x1[3];
x1[3]:=x1[1];
x1[1]:=hhhh;
  hhhh:=y1[3];
y1[3]:=y1[1];
y1[1]:=hhhh;
end;

case21:
if (x1[1]<>x1[2]) and (x1[1]<>y1[2]) then
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;

if (x1[1]=y1[2]) then
begin
hhhh:=x1[2];
x1[2]:=y1[2];
y1[2]:=hhhh;
end;
if (x1[1]<>x1[3]) and (x1[1]<>y1[3]) then
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;

if (x1[1]=y1[3]) then
begin
hhhh:=x1[3];
x1[3]:=y1[3];
y1[3]:=hhhh;
end;
if (y1[2]= y1[3]) then begin
write(f1,'POSSIBLE');
goto nnn;
end
else
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;

case3:
if (x1[1] = y1[1]) and (x1[2] = y1[2]) and (x1[3] <> y1[3]) then goto case311;

if (x1[1] = y1[1]) and (x1[2] <> y1[2]) and (x1[3] = y1[3]) then
  begin
hhhh:= x1[2];
x1[2]:=x1[3];
x1[3]:=hhhh;
hhhh:= y1[2];
y1[2]:=y1[3];
y1[3]:=hhhh;
goto case311;
end;
if (x1[1] <> y1[1]) and (x1[2] = y1[2]) and (x1[3] = y1[3]) then
begin
hhhh:= x1[2];
x1[2]:=x1[1];
x1[1]:=hhhh;
hhhh:= y1[2];
y1[2]:=y1[1];
y1[1]:=hhhh;
goto case311;
end;


case311:
if ((x1[1] = x1[3]) and (x1[2]=y1[3])) or ((x1[1]= y1[3]) and (x1[2]=x1[3]))then
begin
write(f1,'POSSIBLE');
goto nnn;
end
else
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;


if(x1[1]=y1[1]) and (x1[2]= y1[2]) and (x1[3]=y1[3]) then
if (x1[1]=x1[2]) and (x1[1]=x1[3]) then begin
write(f1,'POSSIBLE');
goto nnn;
end
else
begin
write(f1,'IMPOSSIBLE');
goto nnn;
end;
nnn:
close(f1);
  { TODO -oUser -cConsole Main : Insert code here }
end.
