#include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) {     long long tmp;     while (b) {       a %= b;       tmp = a;       a = b;       b = tmp;     }     return a;   }   int main() {     int n;     cin >> n;     vector<int> a(n + 1, 0);     for (int i = 0; i < n; i++) {       cin >> a[i + 1];     }     sort(a.begin(), a.end());     long long sum1 = 0, sum2 = 0;     vector<long long> sum(n + 1, 0);     for (int i = 1; i <= n; i++) {       sum[i] += sum[i - 1] + (long long)i * (a[i] - a[i - 1]);       sum1 += sum[i];       sum2 += a[i];     }     long long num = 2 * sum1 - sum2;     long long den = n;     long long g = gcd(num, den);     cout << num / g <<     << den / g << endl;     return 0;   }   