How many squares

Time Limit : 1 Second

Memory Limit : 128 MB

Submission: 948

Solved: 336

Description
You are give a grid of N*M(1< N, M <1000). And your job is to calculate how many different squares can be found in this gird.
Input
For each test case, given a line of 2 integers, N and M.
Output
One integer in a line, the number of squares can be found.
sample input
3 3
sample output
14
hint
source
Liruqi
© 2015 HUST ACMICPC TEAM. All Right Reserved.