#include <bits/stdc++.h>
using namespace std;
clock_t _start_clock = clock();
inline void _time() {}
inline int log(const char* format, ...) { return 0; }
const double EPS = 10e-8;
const int MAX = 100005;
const int INF = 1 << 30;
long long A[MAX];
long long S[MAX];
long long gcd(long long a, long long b) {
  long long tmp = a;
  a = max(a, b);
  b = min(tmp, b);
  while (b != 0) {
    tmp = a;
    a = b;
    b = tmp % a;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main(int argc, char** argv) {
  ios_base::sync_with_stdio(false);
  int i;
  long long n, nc2, num, den, g;
  long long sum, tmp, a, b, l;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> A[i];
  sort(A + 1, A + n + 1);
  for (i = 1; i <= n; i++) S[i] = S[i - 1] + A[i];
  nc2 = n * (n - 1) / 2;
  g = gcd(S[n], n);
  num = S[n] / g;
  den = n / g;
  for (i = 1; i < n; i++) {
    sum = (S[n] - S[i]) - (n - i) * A[i];
    tmp = (n - 1) * sum;
    g = gcd(tmp, nc2);
    a = tmp / g;
    b = nc2 / g;
    l = lcm(den, b);
    num = l / den * num + l / b * a;
    den = l;
    g = gcd(num, den);
    num /= g;
    den /= g;
  }
  cout << num << " " << den << endl;
  _time();
  return EXIT_SUCCESS;
}
