Divisors

Given all proper divisors of an unknown number N, compute N using the fact that the smallest and largest proper divisors multiply to N.

Easy3MathNumber theoryImplementationInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

A positive integer A is a proper divisor of N if N is a multiple of A and A is neither 1 nor N.

Given all proper divisors of some number N, find N.

Input

The first line contains M, the number of proper divisors. M is a positive integer no greater than 50.

The second line contains the M proper divisors of N. Each divisor is a distinct positive integer between 2 and 1,000,000, inclusive.

Output

Print N on the first line. N can always be represented as a 32-bit signed integer.