eolymp
bolt
Try our new interface for solving problems
Problems

Interesting Product

Interesting Product

Time limit 1 second
Memory limit 128 MiB

Find all possible values of product i \cdot j, if the integer values of variables i and j vary for i from a to b and j from c to d.

Input data

One line contains 4 numbers a, b, c and d (1 \le a, b, c, d \le 10, a can be greater than b, c can be greater than d).

Output data

Print the number of possible product values.

Examples

Input example #1
1 10 1 10
Output example #1
42
Source SFE-2010 Variant 16