#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
long long aa[100005];
int main() {
  long long n, p, q = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    scanf("%I64d", &aa[i]);
    q += aa[i];
  }
  sort(aa + 1, aa + n + 1);
  p = n;
  long long temp = 0;
  for (long long i = 1; i < n; i++) {
    q += (n - i + temp) * (aa[i + 1] - aa[i]) * 2;
    temp += n - i - i;
  }
  long long pp = gcd(p, q);
  p /= pp;
  q /= pp;
  cout << q << " " << p << endl;
  return 0;
}
