#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  long long int i, j, n, r, l, s, sum = 0, p;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + n);
  r = 0;
  l = n - 1;
  s = 0;
  for (i = 0; i < n; i++) {
    s = s + (a[i] * (r - l));
    r++;
    l--;
  }
  sum = sum + (2 * s);
  p = gcd(sum, n);
  cout << sum / p << " " << n / p << endl;
  return 0;
}
