P25090 [AtCoder] Not coprime
普及-
题目描述

Problem Statement

Given are N integers between 2 and 50 (inclusive): $X_1, X_2, \cdots, X_N.$ Find the minimum positive integer Y that satisfies the following for every $i = 1, 2, \cdots, N$:

  • X_i and Y are not coprime.

Input

Input is given from Standard Input in the following format:
N
$X_1 X_2 \ldots X_N$

Output

Print the minimum positive integer that satisfies the condition.

Constraints

  • $1 \leq N \leq 49$
  • $2 \leq X_i \leq 50$
  • $X_i \neq X_j (i \neq j)$
  • All values in input are integers.

Sample Input 1

2
4 3

Sample Output 1

6

Being not coprime with 4 requires being even, and being not coprime with 3 requires being a multiple of 3.

Sample Input 2

1
47

Sample Output 2

47

Sample Input 3

7
3 4 6 7 8 9 10

Sample Output 3

42

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 4 3
样例输出
6