Codeforces Round 362 (Div. 2)
E
PLEASE
Codeforces
未评级
原题
← DF →
翻译中…

As we all know Barney's job is "PLEASE" and he has not much to do at work. That's why he started playing "cups and key". In this game there are three identical cups arranged in a line from left to right. Initially key to Barney's heart is under the middle cup.

翻译中…

image

翻译中…

Then at one turn Barney swaps the cup in the middle with any of other two cups randomly (he choses each with equal probability), so the chosen cup becomes the middle one. Game lasts $*n*$ turns and Barney independently choses a cup to swap with the middle one within each turn, and the key always remains in the cup it was at the start.

翻译中…

After $*n*$-th turn Barney asks a girl to guess which cup contains the key. The girl points to the middle one but Barney was distracted while making turns and doesn't know if the key is under the middle cup. That's why he asked you to tell him the probability that girl guessed right.

翻译中…

Number $*n*$ of game turns can be extremely large, that's why Barney did not give it to you. Instead he gave you an array $*a*_{1}, *a*_{2}, ..., *a*_{*k*}$ such that

翻译中…

image

翻译中…

in other words, $*n*$ is multiplication of all elements of the given array.

翻译中…

Because of precision difficulties, Barney asked you to tell him the answer as an irreducible fraction. In other words you need to find it as a fraction $*p* / *q*$ such that image, where image is the greatest common divisor. Since $*p*$ and $*q*$ can be extremely large, you only need to find the remainders of dividing each of them by $10^{9} + 7$.

翻译中…

Please note that we want image of $*p*$ and $*q*$ to be $1$, not image of their remainders after dividing by $10^{9} + 7$.

翻译中…

Input

翻译中…

The first line of input contains a single integer $*k*$ ($1 ≤ *k* ≤ 10^{5}$) — the number of elements in array Barney gave you.

翻译中…

The second line contains $*k*$ integers $*a*_{1}, *a*_{2}, ..., *a*_{*k*}$ ($1 ≤ *a*_{*i*} ≤ 10^{18}$) — the elements of the array.

翻译中…

Output

翻译中…

In the only line of output print a single string $*x* / *y*$ where $*x*$ is the remainder of dividing $*p*$ by $10^{9} + 7$ and $*y*$ is the remainder of dividing $*q*$ by $10^{9} + 7$.

翻译中…

样例

Input #1
1
2
Output #1
1/2
InputCopy OutputCopy
Input #2
3
1 1 1
Output #2
0/1
InputCopy OutputCopy
题目信息
题号
697E
时间限制
1 s
内存限制
256 MB

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