#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
long long A[MAXN + 1], S[MAXN + 1];
long long gcd(long long a, long long b) {
  while (1) {
    if (!b) return a;
    a %= b;
    if (!a) return b;
    b %= a;
  }
}
int main() {
  int n, i;
  long long num, denom, g;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%I64d", A + i);
  sort(A + 1, A + 1 + n);
  S[0] = 0;
  for (i = 1; i <= n; ++i) S[i] = S[i - 1] + A[i];
  num = 0;
  for (i = 2; i <= n; ++i) num += (i - 1) * A[i] - S[i - 1];
  num <<= 1;
  num += S[n];
  g = gcd(num, n);
  num /= g;
  denom = n / g;
  printf("%I64d %I64d\n", num, denom);
  return 0;
}
