Write a program such that, given n strictly positive natural numbers x1 … xn, prints their least common multiple greater than zero.
Input
Input consists of several cases. Each case begins with a number n ≥ 1, followed by x1 … xn. A special case with n = 0 marks the end of input.
Output
For every case, print in a line the least common multiple greater than zero of x1 … xn. For the given cases, this number will always be between 1 and 109.
Input
3 14 4 5 1 7 2 18 18 2 2000000 3000000 0
Output
140 7 18 6000000