
ZOJ Problem Set  3647
A n * m grid as follow:
Count the number of triangles, three of whose vertice must be gridpoints.
InputThe input consists of several cases. Each case consists of two positive integers n and m (1 ≤ n, m ≤ 1000). OutputFor each case, output the total number of triangle. Sample Input1 1 2 2 Sample Output4 76 hinthint for 2nd case: C(9, 3)  8 = 76 Author: WU, Yingxin 