#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long n;
int a[100005];
int main() {
  cin >> n;
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a, a + (n + 1));
  long long leftSum = 0;
  long long rightSum = 0;
  long long result = 0;
  for (int i = 0; i < n; i++) leftSum += a[n] - a[i];
  for (int i = n; i >= 1; i--) {
    result += leftSum + rightSum;
    rightSum += (n + 1 - i) * (a[i] - a[i - 1]);
    leftSum -= i * (a[i] - a[i - 1]);
  }
  long long _gcd = gcd(result, n);
  cout << result / _gcd << ' ' << n / _gcd;
  return 0;
}
