chandler-needs-the-number

Chandler has a set of N numbers and his company has given him a task to find a number P which has its proper factors as the given numbers.Your task is to help Chandler find that number.

Input
First line will contain single integer N. 
Next line will contain N proper factors {f1,f2,...,fn}.

Output
Print smallest integer having N given proper factors.

Input Constraints
1 ≤ N ≤ 10^6 
2 ≤ fi ≤ 10^9

SAMPLE INPUT
2
2 3

SAMPLE OUTPUT
6

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: