deriv1(th,n,j,s)=\ s=0;\ for(j=1,n,s=s+th[j]);\ print1(" 0 "); print(s);\ s=0;\ for(j=1,n,s=s+j*th[j]);\ print1(" 1 ");\ print1(real(s)%n);print1(" ");print(imag(s)%n);\ s=0;\ for(j=1,n,s=s+j*(j-1)/2*th[j]);\ print1(" 2 ");\ print1(real(s)%n);print1(" ");print(imag(s)%n);\ s=0;\ for(j=1,n,s=s+j*(j-1)*(j-2)/6*th[j]);\ print1(" 3 ");\ print1(real(s)%n);print1(" ");print(imag(s)%n) deriv2(th,n1,n2,j1,j2,s)=\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+th[j1,j2]));\ print1(" 0,0 "); print(s);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*th[j1,j2]));\ print1(" 1,0 ");\ print1(real(s)%n1);print1(" ");print(imag(s)%n1);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j2*th[j1,j2]));\ print1(" 0,1 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*(j1-1)/2*th[j1,j2]));\ print1(" 2,0 "); \ print1(real(s)%n1);print1(" ");print(imag(s)%n1);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*j2*th[j1,j2]));\ print1(" 1,1 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j2*(j2-1)/2*th[j1,j2]));\ print1(" 0,2 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*(j1-1)*(j1-2)/6*th[j1,j2]));\ print1(" 3,0 "); \ print1(real(s)%n1);print1(" ");print(imag(s)%n1);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*(j1-1)/2*j2*th[j1,j2]));\ print1(" 2,1 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\ s=0;\ for(j1=1,n1,for(j2=1,n2,s=s+j1*j2*(j2-1)/2*th[j1,j2]));\ print1(" 1,2 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\ for(j1=1,n1,for(j2=1,n2,s=s+j2*(j2-1)*(j2-2)/6*th[j1,j2]));\ print1(" 0,3 "); \ print1(real(s)%n2);print1(" ");print(imag(s)%n2);\