Олимпиадный тренинг

Задача 31789. Not about spinners


Задача

Темы: Вывод формулы
Sasha doesn't like spinners at all, so he draws in his notebook. He took a notebook sheet from N × M cells and numbered all the cells with different numbers. Now he was wondering how many different rectangles he could cut from this sheet of paper along the borders of the cells.
 
The program receives two numbers N and M as input – dimensions of the original sheet. All numbers – positive integers not exceeding 75000.

The program should output a single number – the number of rectangles that can be cut from a given sheet of paper (the entire sheet is also considered one of the possible rectangles).
 
Input Output Note
2
2
9
3
1
6