#include <bits/stdc++.h>
using namespace std;
long long Inf = (long long)1e20;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  long long acc = 0;
  long long ts = 0;
  for (int i = 0; i < n; i++) {
    acc += 2 * (i * a[i] - ts);
    acc += a[i];
    ts += a[i];
  }
  long long d = n;
  for (int i = 2; i <= min(d, acc); i++)
    if (d % i == 0 && acc % i == 0) {
      acc /= i;
      d /= i;
      i--;
    }
  cout << acc << ' ' << d;
}
