Sticks#10001

Sticks

5 seconds
64 megabytes
Hard

Togrul has four sticks with positive integer lengths. He may break each stick into several parts. The lengths of all resulting sticks must also be positive integers, and the sum of their lengths must be equal to the length of the original stick.

After that, Togrul chooses four sticks from all the obtained ones such that a rectangle can be formed using the chosen sticks as its sides. Each side of the rectangle must consist entirely of exactly one chosen stick.

Togrul wants to obtain a rectangle with the maximum possible area. Help him find such a rectangle.

Input

Four positive integers a, b, c, d~(1 \le a, b, c, d \le 10^9) — the lengths of the sticks that Togrul originally had.

Output

Print one number — the maximum area of a rectangle that Togrul can obtain by arbitrarily breaking the original sticks.

Examples

Example 1

Loading
Loading