Contests | Virtual Contests | Problems | Submit | Runs Status | Rank List | Forum |

Time Limit: 5.0 Seconds Memory Limit: 65536K

Total Runs: 123 Accepted Runs: 53

R2-D2 (our well known friendly robot) needs to perform some operations quickly
to save his space ship. These operations require computing long summations and a
division. Moreover, he needs to find the exact solution and he is required to
present a report with the results. For that, he needs to simplify his solution
as much as possible.
### Input

### Output

### Sample Input

### Sample Output

We assume that there is an array available (X1, X2 , ...) of 99999999 elements.

The array has the peculiar property that the average of the first K numbers is equal to the average of the index K and the number 1.

R2-D2 needs to do the following: Given a natural number N less than 99999999, his assignment is to compute the function:

F(N) = F1(N) / F2(N) where:

F1(N) = N × (Σ_{0 ≤ k ≤ N} k^{4}/X_{k})

F2(N) = (Σ_{0 ≤ k ≤ N} k^{3}/X_{k}) × (Σ_{0 ≤ k ≤ N} k^{2}/X_{k} )

That is, F1(N) = N × ( 1/X_{1} + 16/X_{2} + ... + N^{4}/X_{N}) and

F2(N) = ( 1/X_{1} + 8/X_{2} + ... + N^{3}/X_{N}) × ( 1/X_{1} +4/X_{2} + ... + N^{2}/X_{N})

Since R2-D2 needs an exact solution, we ask him to report the following:

The solution needs to be given as a pair of relative prime numbers a,b such that
f(N) = a/b if the solution is not an exact integer. Otherwise just give the exact integer. The numbers processed
by R2-D2 were of eight digits (99999999). Remember that R2-D2 was built long long time ago. His circuits are
not that fast but he is clever. R2-D2 was able to perform one of these operations in less than one second. Can
you do this assignment as fast as R2-D2 did it?

You will receive an input line with natural numbers separated by comma. Each number is less than 99999999. You will receive no more than 20 numbers.

You need to give a sequence of lines each one with the solution of the corresponding input case. The solution is either a pair of natural numbers separated by the symbol / representing the pair a,b mentioned above (when the division is not exact) or just one natural number (when the division is exact). Notice that these numbers could require more than 8 digits.

1,2

1 6/5

Maintance:Fxz. Developer: SuperHacker, G.D.Retop, Fxz