~/algor $ cat problems/sonlar-kop-sonlar-ekuki
LCM of many numbers
Medium
1000 ms
128 MB
47%
You are given $n$ positive integers. Find their least common multiple (LCM). The answer can be very large; print it modulo $10^{9} + 7$.
Input
The first line contains a positive integer $n$. The second line contains $n$ positive integers $a_{i}$ separated by spaces.
Output
One integer — the LCM modulo $10^{9} + 7$.
Note
$1 \le n \le 10^{5}$
$1 \le a_{i} \le 10^{6}$
Examples
Input #1
4 4 6 10 15
Output #1
60
Input #2
1 1
Output #2
1