#include <bits/stdc++.h>
using namespace std;
long long a[100005], sum[100005], n;
long long sol = 0LL, total = 0LL;
long long cmmdc(long long a, long long b) {
  if (b == 0) return a;
  return cmmdc(b, a % b);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    total += a[i];
  }
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n; i++) sum[i] = a[i] - a[i - 1];
  for (int i = n; i >= 2; i--) {
    sum[i] = sum[i + 1] + (n - i + 1) * sum[i];
    sol += sum[i];
  }
  sol *= 2LL;
  sol += total;
  long long x = cmmdc(sol, n);
  cout << sol / x << " " << n / x << "\n";
  return 0;
}
