#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
long long n, a[100003], diff[100003], d[100003];
int main() {
  cin >> n;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + n);
  if (n == 2) {
    long long total = (a[0] + a[1]) + 2 * (a[1] - a[0]);
    long long g = gcd(total, n);
    cout << total / g << " " << n / g << endl;
    return 0;
  }
  long long total = 0;
  for (int i = 1; i < n; i++) {
    diff[i] = abs(a[i] - a[i - 1]);
    d[i] = diff[i];
  }
  for (int i = 1; i < n - 1; i++) {
    diff[i + 1] += diff[i];
  }
  for (int i = 1; i < n; i++) total += diff[i];
  diff[n] = total;
  int m = n - 1;
  for (int i = 1; i <= n - 3; i++) {
    total += (diff[n] - m * d[i]);
    diff[n] = (diff[n] - m * d[i]);
    m--;
  }
  total += d[n - 1];
  total *= 2;
  total += sum;
  long long g = gcd(total, n);
  cout << total / g << " " << n / g << endl;
  return 0;
}
