#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int n, i;
  long long num, sum, g, pr;
  vector<long long> st, cum;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> num;
    st.push_back(num);
  }
  sort(st.begin(), st.end());
  sum = 0;
  pr = 0;
  for (i = 0; i < n; i++) sum = sum + st[i];
  cum.push_back(st[0]);
  for (i = 1; i < n; i++) cum.push_back(cum[i - 1] + st[i]);
  for (i = 0; i < n - 1; i++) {
    num = cum[n - 1] - cum[i + 1] + st[i + 1];
    pr = pr + num - st[i] * (n - i - 1);
  }
  sum = sum + pr * 2;
  if (sum > n)
    g = gcd(sum, n);
  else
    g = gcd(n, sum);
  sum = sum / g;
  n = n / g;
  cout << sum << " " << n << endl;
  return 0;
}
