#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, a[N];
long long sum[N];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + a[i];
  long long tot = 0;
  for (int i = 1; i <= n; ++i)
    tot += (long long)(2 * i - n) * a[i] + sum[n] - sum[i] - sum[i - 1];
  long long d = gcd(tot, n);
  printf("%I64d %I64d\n", tot / d, n / d);
}
