#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const long long Mod = 1e9 + 7;
template <class T>
T checkMax(T& r, T val) {
  if (r < val) r = val;
  return r;
}
template <class T>
T checkMin(T& r, T val) {
  if (r > val) r = val;
  return r;
}
int n, m, K;
int d[N];
long long sum[N];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d", d + i);
  sort(d, d + n);
  for (i = 0; i < n; ++i) {
    if (i == 0)
      sum[0] = d[0];
    else
      sum[i] = d[i] + sum[i - 1];
  }
  long long res = 0;
  for (i = 0; i < n; ++i) {
    long long t = d[i] * (n - 1LL - i);
    long long s = sum[n - 1] - sum[i];
    res += s - t;
  }
  res = res * 2LL + sum[n - 1];
  long long den = n;
  long long g = gcd(res, n);
  res /= g;
  den /= g;
  cout << res << " " << den << endl;
  return 0;
}
