You are given a function:
where denotes the factorial operation. In other words, the function returns if is divisible by , and otherwise.
Given an array , print out the minimum value of for all elements in .
Input Specification
The first line will contain the integer .
The second line will contain integers, .
Output Specification
Print the minimum value of for all elements in .
Scoring
Let represent the number of characters in your solution.
If is less than , your score will be .
If is greater than or equal to , and less than , your score is .
Otherwise, your score is .
Sample Input
8
2 5 3 9 3 5 7 12
Sample Output
-12
Comments