2247.PLEASE

Time Limit: 1s Memory Limit: 256MB

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. 2247_1.png 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 a1,a2,...,ak such that 2247_2.png 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 2247_3.png, where 2247_4.png 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 109+7.Please note that we want 2247_4.png of p and q to be 1, not 2247_4.png of their remainders after dividing by 109+7.

Input Format(From the terminal/stdin)

Input The first line of input contains a single integer k (1 \le k \le 105)- the number of elements in array Barney gave you.The second line contains k integers a1,a2,...,ak (1 \le ai \le 1018)- the elements of the array.

Output Format(To the terminal/stdout)

Output In the only line of output print a single string x/y where x is the remainder of dividing p by 109+7 and y is the remainder of dividing q by 109+7.

Sample Input 1

Copy
1
2
 \n
 \n

Sample Output 1

Copy
1/2
   \n

Sample Input 2

Copy
3
1 1 1
 \n
 · · \n

Sample Output 2

Copy
0/1
   \n

Submit

请先 登录

© 2025 FAQs