#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long s[maxn], sum[maxn];
long long eucild(long long x, long long y) {
  long long temp;
  while (y) {
    temp = x % y;
    x = y;
    y = temp;
  }
  return x;
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &s[i]);
    }
    sort(s + 1, s + n + 1);
    for (int i = 1; i <= n; i++) {
      sum[i] = sum[i - 1] + s[i];
    }
    long long ans = 0;
    for (int i = 1; i <= n; i++) {
      ans += sum[n] - 2 * sum[i] + (2 * i - n) * s[i];
    }
    ans += sum[n];
    int g = eucild(ans, n);
    printf("%I64d %d\n", ans / g, n / g);
  }
}
