Problem Description
There is a positive integer N,satisfied that (N / a1) equals K1a1, (N / a2) equals K2a2 and so on. Then, I want you to tell me the smallest N.
Input
Input is a integer n(1<=n<=6), then n numbers ai (16 < ai < 10000 )described above.
Output
If there exists such a N,output N mod 19880502, else -1 instead.
Sample Input
1
323
2
17 19
Sample Output
323
3493625