#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  while (a && b) {
    if (a > b) {
      a %= b;
    } else {
      b %= a;
    }
  }
  return std::max(a, b);
}
int main() {
  int n;
  vector<long long> d;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int a;
    scanf("%d", &a);
    d.push_back(a);
  }
  long long prev = 0;
  sort(d.begin(), d.end());
  for (int i = 0; i < n; ++i) {
    long long save = d[i];
    d[i] = d[i] - prev;
    prev = save;
  }
  long long c = 0, sum = 0;
  for (int i = 0; i < n; ++i) {
    c += (n - i);
    int idx = i % 2 ? n - 1 - i / 2 : i / 2;
    sum += c * d[idx];
  }
  long long g = gcd(sum, (long long)n);
  printf("%I64d %I64d\n", sum / g, n / g);
}
