#include <bits/stdc++.h>
using namespace std;
int n, m, y, z;
long long res, x;
long long a[100010];
long long ucln(long long a, long long b) {
  if (a < b) swap(a, b);
  while (b > 0) {
    long long tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
int main() {
  if (0) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  };
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long long sum = 0;
  for (int i = 0; i < n; i++) sum += a[i];
  res = sum;
  long long sum1 = 0;
  for (int i = 0; i < n; i++) {
    sum -= a[i];
    if (i > 0) res += a[i] * i - sum1;
    res += sum - a[i] * (n - i - 1);
    sum1 += a[i];
  }
  x = ucln(res, n);
  cout << res / x << " " << n / x;
  return 0;
}
