#include <bits/stdc++.h>
using namespace std;
int IN() {
  int c, x;
  while (!isdigit(c = getchar()))
    ;
  x = c - '0';
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + c - '0';
  return x;
}
const int N = 100000 + 19;
long long A, B, t, tmp;
int D[N], n;
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
int main() {
  B = n = IN();
  for (int i = 0; i < n; i++) D[i] = IN();
  sort(D, D + n);
  for (int i = 0; i < n; i++) A += 1LL * i * D[i] - tmp, tmp += D[i];
  A *= 2;
  for (int i = 0; i < n; i++) A += D[i];
  t = gcd(A, B);
  printf("%I64d %I64d\n", A / t, B / t);
}
