Given the numbers a, b, c and d find the smallest positive integer n, greater than a * c, which cannot be represented as the product of two natural numbers u and v such that a ≤ u ≤ b и c ≤ v ≤ d.
Positive integers a, b, c, d (1 ≤ a ≤ b ≤ 10^6
, 1 ≤ c ≤ d ≤ 10^6
).
Print the desired number n.