#include <bits/stdc++.h>
using namespace std;
int a[100005], n;
long long gcd(long long a, long long b) {
  while (b ^= a ^= b ^= a %= b)
    ;
  return a;
}
int main() {
  long long s = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  sort(a, a + n);
  long long fz = s;
  long long fm = n;
  long long t = a[0];
  for (int i = 1; i < n; ++i) {
    fz = fz + 2ll * ((s - t) - (long long)a[i - 1] * (n - i));
    t += a[i];
  }
  long long d = gcd(fz, fm);
  cout << fz / d << ' ' << fm / d << endl;
  return 0;
}
