#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int maxn = (int)1e5 + 10;
const int mod = (int)1e9;
double aabs(double a) { return a < 0 ? -a : a; }
long int a[100005];
long long gcd(long long x, long long y) {
  if (x % y == 0)
    return y;
  else
    return gcd(y, x % y);
}
int main() {
  int n, i, j;
  long long s, t, g, pr;
  cin >> n;
  s = 0;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    s = s + a[i];
  }
  sort(a + 1, a + n + 1);
  pr = s;
  for (i = 1; i < n; i++) {
    pr = pr - a[i];
    s = s + 2 * (pr - 1LL * (n - i) * a[i]);
  }
  g = gcd(s, n);
  s = s / g;
  n = n / g;
  cout << s << " " << n << endl;
  return 0;
}
