ll@N,@B;if(N%2|B%2)wt((N-1)*(B+1)/2%B);else wt("NaN" );