#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  long long c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int main() {
  long long sum = 0;
  long long n;
  scanf("%I64d", &n);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  std::sort(a, a + n);
  long long t = n - 1;
  long long s = 0;
  for (int i = n - 1; i >= n / 2; i--, t -= 2) s += t * (a[i] - a[n - i - 1]);
  sum += s * 2;
  t = gcd(sum, n);
  printf("%I64d %I64d", sum / t, n / t);
}
