varbigInt=function(e){"use strict";functiono(e,t){returntypeofe=="undefined"?o[0]:typeoft!="undefined"?+t===10?Y(e):$(e,t):Y(e)}functionu(e,t){this.value=e,this.sign=t,this.isSmall=!1}functiona(e){this.value=e,this.sign=e<0,this.isSmall=!0}functionf(e){return-r<e&&e<r}functionl(e){returne<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}functionc(e){h(e);varn=e.length;if(n<4&&_(e,i)<0)switch(n){case0:return0;case1:returne[0];case2:returne[0]+e[1]*t;default:returne[0]+(e[1]+e[2]*t)*t}returne}functionh(e){vart=e.length;while(e[--t]===0);e.length=t+1}functionp(e){vart=newArray(e),n=-1;while(++n<e)t[n]=0;returnt}functiond(e){returne>0?Math.floor(e):Math.ceil(e)}functionv(e,n){varr=e.length,i=n.length,s=newArray(r),o=0,u=t,a,f;for(f=0;f<i;f++)a=e[f]+n[f]+o,o=a>=u?1:0,s[f]=a-o*u;while(f<r)a=e[f]+o,o=a===u?1:0,s[f++]=a-o*u;returno>0&&s.push(o),s}functionm(e,t){returne.length>=t.length?v(e,t):v(t,e)}functiong(e,n){varr=e.length,i=newArray(r),s=t,o,u;for(u=0;u<r;u++)o=e[u]-s+n,n=Math.floor(o/s),i[u]=o-n*s,n+=1;while(n>0)i[u++]=n%s,n=Math.floor(n/s);returni}functiony(e,n){varr=e.length,i=n.length,s=newArray(r),o=0,u=t,a,f;for(a=0;a<i;a++)f=e[a]-o-n[a],f<0?(f+=u,o=1):o=0,s[a]=f;for(a=i;a<r;a++){f=e[a]-o;if(!(f<0)){s[a++]=f;break}f+=u,s[a]=f}for(;a<r;a++)s[a]=e[a];returnh(s),s}functionb(e,t,n){varr,i;return_(e,t)>=0?r=y(e,t):(r=y(t,e),n=!n),r=c(r),typeofr=="number"?(n&&(r=-r),newa(r)):newu(r,n)}functionw(e,n,r){vari=e.length,s=newArray(i),o=-n,f=t,l,h;for(l=0;l<i;l++)h=e[l]+o,o=Math.floor(h/f),h%=f,s[l]=h<0?h+f:h;returns=c(s),typeofs=="number"?(r&&(s=-s),newa(s)):newu(s,r)}functionE(e,n){varr=e.length,i=n.length,s=r+i,o=p(s),u=t,a,f,l,c,d;for(l=0;l<r;++l){c=e[l];for(varv=0;v<i;++v)d=n[v],a=c*d+o[l+v],f=Math.floor(a/u),o[l+v]=a-f*u,o[l+v+1]+=f}returnh(o),o}functionS(e,n){varr=e.length,i=newArray(r),s=t,o=0,u,a;for(a=0;a<r;a++)u=e[a]*n+o,o=Math.floor(u/s),i[a]=u-o*s;while(o>0)i[a++]=o%s,o=Math.floor(o/s);returni}functionx(e,t){varn=[];while(t-->0)n.push(0);returnn.concat(e)}functionT(e,t){varn=Math.max(e.length,t.length);if(n<=30)returnE(e,t);n=Math.ceil(n/2);varr=e.slice(n),i=e.slice(0,n),s=t.slice(n),o=t.slice(0,n),u=T(i,o),a=T(r,s),f=T(m(i,r),m(o,s)),l=m(m(u,x(y(y(f,u),a),n)),x(a,2*n));returnh(l),l}functionN(e,t){return-0.012*e-.012*t+15e-6*e*t>0}functionC(e,n,r){returne<t?newu(S(n,e),r):newu(E(n,l(e)),r)}functionk(e){varn=e.length,r=p(n+n),i=t,s,o,u,a,f;for(u=0;u<n;u++){a=e[u];for(varl=0;l<n;l++)f=e[l],s=a*f+r[u+l],o=Math.floor(s/i),r[u+l]=s-o*i,r[u+l+1]+=o}returnh(r),r}functionL(e,n){varr=e.length,i=n.length,s=t,o=p(n.length),u=n[i-1],a=Math.ceil(s/(2*u)),f=S(e,a),l=S(n,a),h,d,v,m,g,y,b;f.length<=r&&f.push(0),l.push(0),u=l[i-1];for(d=r-i;d>=0;d--){h=s-1,f[d+i]!==u&&(h=Math.floor((f[d+i]*s+f[d+i-1])/u)),v=0,m=0,y=l.length;for(g=0;g<y;g++)v+=h*l[g],b=Math.floor(v/s),m+=f[d+g]-(v-b*s),v=b,m<0?(f[d+g]=m+s,m=-1):(f[d+g]=m,m=0);while(m!==0){h-=1,v=0;for(g=0;g<y;g++)v+=f[d+g]-s+l[g],v<0?(f[d+g]=v+s,v=0):(f[d+g]=v,v=1);m+=v}o[d]=h}returnf=O(f,a)[0],[c(o),c(f)]}functionA(e,n){varr=e.length,i=n.length,s=[],o=[],u=t,a,f,l,h,p;while(r){o.unshift(e[--r]);if(_(o,n)<0){s.push(0);continue}f=o.length,l=o[f-1]*u+o[f-2],h=n[i-1]*u+n[i-2],f>i&&(l=(l+1)*u),a=Math.ceil(l/h);do{p=S(n,a);if(_(p,o)<=0)break;a--}while(a);s.push(a),o=y(o,p)}returns.reverse(),[c(s),c(o)]}functionO(e,n){varr=e.length,i=p(r),s=t,o,u,a,f;a=0;for(o=r-1;o>=0;--o)f=a*s+e[o],u=d(f/n),a=f-u*n,i[o]=u|0;return[i,a|0]}functionM(e,n){varr,i=Y(n),s=e.value,f=i.value,h;if(f===0)thrownewError("Cannot divide by zero");if(e.isSmall)returni.isSmall?[newa(d(s/f)),newa(s%f)]:[o[0],e];if(i.isSmall){if(f===1)return[e,o[0]];if(f==-1)return[e.negate(),o[0]];varp=Math.abs(f);if(p<t){r=O(s,p),h=c(r[0]);varv=r[1];returne.sign&&(v=-v),typeofh=="number"?(e.sign!==i.sign&&(h=-h),[newa(h),newa(v)]):[newu(h,e.sign!==i.sign),newa(v)]}f=l(p)}varm=_(s,f);if(m===-1)return[o[0],e];if(m===0)return[o[e.sign===i.sign?1:-1],o[0]];s.length+f.length<=200?r=L(s,f):r=A(s,f),