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