#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long t;
  while (b != 0) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
long long a[100010], dp[100010];
int main() {
  long long n, i;
  scanf("%lld", &n);
  dp[0] = a[0] = 0;
  for (i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  sort(a, a + n + 1);
  long long ans = 0, s = 0;
  for (i = 1; i <= n; ++i) {
    s += a[i];
    ans = ans + 2 * (a[i] - a[i - 1]) * i * (n - i + 1);
  }
  ans = ans - s;
  long long hcf = gcd(ans, n);
  ans /= hcf;
  n /= hcf;
  printf("%lld %lld\n", ans, n);
}
