ll@X[8];MatrixM(2,2),v(2,1);v[0][0].setmod(X[7]);rep(i,2)rep(j,2)M[i][j]=X[2i|j];rep(i,2)v[i][0]=X[4|i];v=M**X[6]*v;wt(v(2)[0]);