#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);
}
vector<long long> a;
int main() {
  long long n;
  cin >> n;
  a.resize(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  long long l = 0, r = 0;
  for (long long i = 0; i < n; i++) r += a[i];
  long long ans = r;
  for (long long u = 0; u < n; u++) {
    r -= a[u];
    ans += (2 * u - n + 1) * a[u] + r - l;
    l += a[u];
  }
  long long a1 = ans, b1 = n;
  long long g = gcd(a1, b1);
  a1 /= g, b1 /= g;
  cout << a1 << " " << b1 << endl;
  return 0;
}
