spoj#EXPOR. OR
OR
Given an array of N integers A1, A2, A3…AN. If you randomly choose two indexes i ,j such that 1 ≤ i < j ≤ N, what is the expected value of Ai | Aj?
Input
First line contains an integer T, the number of test cases. Each test case consists of two lines. First line denotes the size of array, N and second line contains N integers forming the array.
1 ≤ T ≤ 10
2 ≤ N ≤ 100,000
0 ≤ Ai < 231
Output
For each test case, print the answer as an irreducible fraction. Follow the format of the sample output.
The fraction p/q (p and q are integers, and both p ≥ 0 and q > 0 holds) is called irreducible, if there is no such integer d > 1 that divides both p and q separately.
Example
Input: 2 2 0 0 3 1 2 3</p>Output: 0/1 3/1