func_code_string: #include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) {     if (b == 0) return a;     return gcd(b, a % b);   }   int a[100005];   long long s[100005], b[100005];   int main() {     int n;     cin >> n;     for (int i = 0; i < n; ++i) scanf( %d , a + i);     sort(a, a + n);     s[0] = a[0];     b[n] = 0;     for (int i = 1; i <= n; ++i) s[i] = s[i - 1] + a[i];     for (int i = n - 1; i >= 0; --i) b[i] = b[i + 1] + a[i];     long long ll = 0, rr = n;     for (int i = 0; i < n; ++i) {       ll += (a[i] * (i + 1LL) - s[i] + b[i] - a[i] * (n - i + 0LL) + a[i]);     }     long long g = gcd(ll, rr);     cout << ll / g <<     << rr / g << endl;     return 0;   }   