Codeforces Round 338 (Div. 2)
D
Multipliers
Codeforces
2000
原题
← CE →
翻译中…

Ayrat has number $*n*$, represented as it's prime factorization $*p*_{*i*}$ of size $*m*$, i.e. $*n* = *p*_{1}·*p*_{2}·...·*p*_{*m*}$. Ayrat got secret information that that the product of all divisors of $*n*$ taken modulo $10^{9} + 7$ is the password to the secret data base. Now he wants to calculate this value.

翻译中…

Input

翻译中…

The first line of the input contains a single integer $*m*$ ($1 ≤ *m* ≤ 200 000$) — the number of primes in factorization of $*n*$.

翻译中…

The second line contains $*m*$ primes numbers $*p*_{*i*}$ ($2 ≤ *p*_{*i*} ≤ 200 000$).

翻译中…

Output

翻译中…

Print one integer — the product of all divisors of $*n*$ modulo $10^{9} + 7$.

翻译中…

Note

翻译中…

In the first sample $*n* = 2·3 = 6$. The divisors of $6$ are $1$, $2$, $3$ and $6$, their product is equal to $1·2·3·6 = 36$.

翻译中…

In the second sample $2·3·2 = 12$. The divisors of $12$ are $1$, $2$, $3$, $4$, $6$ and $12$. $1·2·3·4·6·12 = 1728$.

翻译中…

样例

Input #1
2
2 3
Output #1
36
InputCopy OutputCopy
Input #2
3
2 3 2
Output #2
1728
InputCopy OutputCopy
题目信息
题号
615D
时间限制
2 s
内存限制
256 MB
标签
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。