program B1;
var a,b:array[1..6]of integer;
  i,j,k,P,n1,n2,n3:integer;
  p1,p2,p3:integer;
  f:textfile;
begin
 assignfile(f,'box.in');
 reset(f);
 for i:=1 to 6 do
 readln(f,a[i],b[i]);
 close(f);
 P:=0;
 for i:=1  to 5 do
 begin
  if (a[i]=a[i+1])and(b[i]=b[i+1]) then inc(P);
 end;



 for i:=1 to 6 do
  for j:=1 to 5 do
   for k:=1 to 4 do
    begin
      if ( (a[i]=b[k])and(b[i]=b[j])and(a[j]=a[k]))or
         ( (a[i]=b[j])and(b[i]=b[k])and(a[j]=a[k]))or
         ( (a[i]=a[j])and(b[i]=b[k])and(b[j]=a[k]))or
         ( (a[i]=a[j])and(b[i]=a[k])and(b[j]=b[k]))or
         ( (a[i]=b[j])and(b[i]=a[k])and(a[j]=b[k]))or
         ( (a[i]=b[k])and(b[i]=a[j])and(b[j]=a[k]))or
         ( (a[i]=a[k])and(b[i]=b[j])and(a[j]=b[k]))or
         ( (a[i]=a[k])and(b[i]=a[j])and(b[j]=b[k]))
         then
         begin
         n1:=i;
         n2:=j;
         n3:=k;
         end;
     END;
p1:=0;p2:=0;p3:=0;

     for i:=1 to 6 do
      begin
       if ( ((a[i]=a[n1])and(b[i]=b[n1])) or ((a[i]=b[n1])and(b[i]=a[n1])) ) and (i<>n1) and (i<>p2) and (i<>p3) then p1:=i;
       if ( ((a[i]=a[n2])and(b[i]=b[n2])) or ((a[i]=b[n2])and(b[i]=a[n2])) ) and (i<>n2) and (i<>p1) and (i<>p3) then p2:=i;
       if ( ((a[i]=a[n3])and(b[i]=b[n3])) or ((a[i]=b[n3])and(b[i]=a[n3])) ) and (i<>n3) and (i<>p1) and (i<>p2) then p3:=i;
      end;

assignfile(f,'box.out');
  rewrite(f);
  if ((p1<>0)and(p2<>0)and(p3<>0))or (P=5) then  writeln(f,'POSSIBLE') else writeln(f,'IMPOSSIBLE');
  closefile(f);

end.
