#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b != 0) ? gcd(b, a % b) : a; }
int main() {
  long long n, a[100001];
  long long t[100001] = {0};
  long long sum = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  long long b = 0;
  for (int i = 0; i < n; ++i) {
    b += a[i];
    t[i] = b;
  }
  sum += t[n - 1];
  for (long long i = 0; i < n; ++i) {
    sum += (t[n - 1] - t[i]) - a[i] * (n - 1 - i);
    if (i != 0) {
      sum += a[i] * i - (t[i - 1]);
    }
  }
  long long d = gcd(sum, n);
  sum /= d;
  n /= d;
  cout << sum << " " << n;
}
