#include <bits/stdc++.h>
using namespace std;
long long arr[100000];
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  long long n, sum = 0LL;
  cin >> n;
  for (int i = 0, _n = n; i < _n; i++) cin >> arr[i];
  sort(arr, arr + n);
  long long xx = arr[0];
  for (int i = 1, _n = n; i < _n; i++) {
    sum += (arr[i] * i - xx);
    xx += arr[i];
  }
  sum = sum * 2 + xx;
  long long g = gcd(sum, n);
  cout << (sum / g) << " " << n / g << "\n";
  return 0;
}
