#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  T c = a, d = b, r;
  if (a < b) swap(a, b);
  if (b == 0) return a;
  do {
    r = c % d;
    c = d;
    d = r;
  } while (r);
  return c;
}
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<int> A(n);
  for (long long(i) = 0; (i) < (n); (i)++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  long long sum = 0;
  long long num = 0;
  for (long long(i) = 0; (i) < (n); (i)++) {
    num += (A[i] * i - sum) * 2;
    num += A[i];
    sum += A[i];
  }
  long long deno = n;
  long long g = gcd(deno, num);
  deno /= g;
  num /= g;
  cout << num << " " << deno << endl;
  return 0;
}
