#include<bits/stdc++.h>
using namespace std; int main(){
int T,n,m;scanf("%d",&T);
while(T --){
scanf("%d",&n);
long long nksum = , sum = ;
for(int i = ; i < n; i ++){
scanf("%d", &m);
nksum += 1LL * n * m * m;
sum += abs(1LL * m);
}
long long a = nksum - sum * sum;
long long b = n;
long long gcd = __gcd(a, b);
printf("%lld/%lld\n",a/gcd, b/gcd);
}
return ;
}