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;
  min,max,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
min:=a[1]; max:=a[1];
for i:=1 to 6 do
begin
   if a[i]>max then max:=a[i];
   if a[i]<min then min:=a[i];
   if b[i]>max then max:=b[i];
   if b[i]>min then min:=b[i];
  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
  if b[i]>a[i] then
     begin
     c:=b[i];   b[i]:=a[i]; a[i]:=c
     end;
for i:=1 to 6 do
begin
  k[i]:=0;
  for j:=1 to 6 do
    if   (a[i]=a[j]) and (b[i]=b[j]) then  k[i]:=k[i]+1;
end;
bl:=true;
for I:=1 to 6 do
begin
   if (d[i] mod 4<>0) or (k[i] mod 2<>0) then
   bl:=false
end;
  for i:=1 to 6 do
    begin
       if (max<>min) and ((a[i]=min) or (b[i]=max)) then bl:=false;
    end;
if bl then
   write('POSSIBLE')
   ELSE   write('IMPOSSIBLE');
end;
end.