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