type  dd=1..10000;
      ss=1..6;
var
 d,k:array[1..6] of byte;
 a,b:array[1..6] of dd;
      i,j:ss;
  c:dd;
     bl:boolean;
begin
{I-}
assign(input,'box.in'); reset(input);
assign(output,'box.out'); rewrite(output);
readln(a[1],b[1]);
readln(a[2],b[2]);
readln(a[3],b[3]);
readln(a[4],b[4]);
readln(a[5],b[5]);
readln(a[6],b[6]);
{i+}
if Ioresult=0 then
begin

for i:=1 to 6 do
begin
  d[i]:=0;
  for j:=1 to 6 do
  begin
    if a[i]=a[j] then d[i]:=d[i]+1;
    if a[i]=b[j] then d[i]:=d[i]+1;
  end;
end;


for i:=1 to 6 do
begin
  k[i]:=1;
  for j:=1 to 6 do
    if i<>j then
    if ((a[i]=a[j]) and (b[i]=b[j])) or  ((a[i]=b[j]) and (b[i]=a[j])) then
     k[i]:=k[i]+1;
end;
bl:=false;
for I:=1 to 6 do
begin
   if (d[i] mod 4=0) and (k[i] mod 2=0) then
   bl:=true;
end;

if bl then
   write('POSSIBLE')
   ELSE   write('IMPOSSIBLE');
end;
end.