#include                                               <stdlib.h>
   #include                                                         <stdio.h>
#define                             a                                   typedef
a                                 long                                       N;
#define                     i =m(p(r,o,v),e,d 
N                           G,l,I,C,B,A,W,L,S
,                               R,O,c,k,s                                     =
80,                                                                        U=13
,T=169;                                                             a double P;
   #define                                                       F for(
      a P*E; a char*w;                               P sqrt(P); N H(){ F;
            O=scanf(" %[#]%*[^\n]",&O); ); scanf("%ld%*c",&O);
                            #define D return
                                  D O; } 



#define V                                                 =malloc(sizeof(
#define  M                                               M(
#define   X                                             +=
P M N R){ s=                                           s>=k?printf( "%ld%c"
+3*(C<1),s-k,                                         R&7?32:10):s; D R>0?B
/2?H():getchar                                       ():R?.9+.7*M R+1):0; }
P t(N x,P K){ D                                     x?(x>U?0:t(x+2,K)*(x-1)
/x/K)+1/sqrt(K):                                   t(2,K*K/U+1)*K; }  N _(N
J,N x){ F*(x?&W:&                                 A)=W+J+x; (O=x=W/(J=k*k))
||A<J||(( O=2*W/J)                               &&2*A/J<3); A  X A-J+1){ F 
J*=x+O; S--*B&&x==O                             ; O=x=!J){ s X x+s; M 0); } 
W X W-J;  S X 2; L X                           L-J*k+M S%8==B); } D  1; } E 
p(E J,E x,E O){ F R=T;                        R--; )O[R]=J[R]+.8*x[R]; D O; 
} P m(E W,E x,P s){ F R          =           U; --R; ){ E A=W+R*U; W[R]X s/
12; *W X s; *A-=*x++; F;        A>W;        ){ *A/=*W; F O=R; O; O--)A[O]-=
W[O]**A;  A-=U; } W X 14;     } D*W; }     int main(int z,w*y){ N K=s,g; Y; 
M z); s= B=C=15-H(); s=G=   M 8); s=l=M   C); G*=g=C%3?1:3; if(I=s=M 8)){ N 
b=G+9,x=b*340+U,J=b*(l+5), * n V N ) * J ),*j=n+5*b; E h V P)*x),q=h+b,e=q+
b; P d=K; F; J--; )n[J]=J<b ? 0: I / 2  ; F; x; )h[--x]=0; s=M x); k=256; C
=4-C; B=C/4;  s=_(_(T,0),0); F ; -- z  ; ){ R=atoi(*++y); c=R>0?K=R,c :-2*R; 
} z=G/K+1; z X g>z; I++; c++; F ;  ++ J<l; ){ P u=0,C,y; E H =e+U,o= H+b*T,r
=o-2*T,v=r-T; F; x<G; x++){ p( H , o -T,o); o X T; H X T; q[x]= .7*(q[x-1]+h
                               [x] ); 
                               } p(H,
                               H,r ); 
                               F;  x; 
                              ) { E S= 
                             e ; w  l =
                          " !{   ,;lf6D@"
                        ; j X 1-g; F; *++l; 
                      ){ *S++ =*j; j X*l%3*g-
                    g+*l%5*b-3*b; } y =M  x-G); 
                  y =M-J)* M-x)+ M-J-1)*y+.01; y=
                sqrt((u+q[--x]+.1)/y ); o-=T; C i)+
              #define Z(x)(t(0,(x-C)/y)-l+1e-6*(x-Q))
            .5; K=M-B); { N f=I,Q=0; F; f-Q>c; ){ P l=0
          ; N H = C+c/2+1; H%=c; H X(f+Q+c-2*H)/2/c*c; l=
        Z(Q); O=(A-W)*Z(H)/Z(f); _(O,R=B?K>= H:L/k>O+W); *(
      R?&Q:&f)=H; } Q X f; *S=*j=Q/=2; s=B?s:Q+k; f=Q+n[x/z]; 
    n[x/z]=x%z+J%(z*2/g)?f:!putc(x?l[4*g*f/z/z/I-8]:10,stderr); 
  H-=U; F O=156; O--; ){ H--; *H=e[O%U]*e[O/U]/y+.8**H; } C-=Q+.5
; y i/.9)-Q-C; p(p(r+T,r,r),H,r); h[x]=.7*h[x]+C*C; u X h[x]; u*=.7
       ; d X C>0?-y:y; } } j X 9; } _(_(x,x),x); } D 0; }