You have two positive integers w and h. Your task is to count the number of rhombi which have the following properties:
Count the number of such rhombi.
Let us remind you that a rhombus is a quadrilateral whose four sides all have the same length.
5 5 3 2 7 5 5 2
2 2
In the first example Polycarpus can cut the ribbon in such way: the first piece has length 2, the second piece has length 3. In the second example Polycarpus can cut the ribbon in such way: the first piece has length 5, the second piece has length 2.
CodeForces