#include <bits/stdc++.h>
using namespace std;
long long getGCD(long long a, long long b) {
  if (a % b == 0) return b;
  return getGCD(b, a % b);
}
int main() {
  long long N, x, sum, res;
  vector<long long> Map;
  cin >> N;
  Map.push_back(0);
  for (int i = 0; i < N; i++) {
    cin >> x;
    Map.push_back(x);
  }
  sort(Map.begin(), Map.end());
  sum = 0;
  res = 1;
  for (int i = 1; i < Map.size(); i++) {
    sum += (long long)(Map.size() - (long long)i) * (Map.at(i) - Map.at(i - 1));
    sum += (long long)(2 * (Map.size() - (long long)i) * ((long long)i - 1)) *
           (Map.at(i) - Map.at(i - 1));
  }
  res = getGCD(sum, N);
  cout << (sum / res) << " " << (N / res) << endl;
  return 0;
}
