#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
long long n;
long long a[100009];
long long s1[100009];
long long s2[100009];
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int main() {
  while (scanf("%I64d", &n) != EOF) {
    for (long long i = 1; i <= n; i++) scanf("%I64d", &a[i]);
    sort(a + 1, a + n + 1);
    s1[1] = a[1];
    s2[1] = 0;
    for (int i = 2; i <= n; i++)
      s1[i] = s1[i - 1] + a[i], s2[i] = s2[i - 1] + (i - 1) * a[i] - s1[i - 1];
    long long x = s1[n] + 2 * s2[n];
    long long y = n;
    long long d = gcd(x, y);
    x /= d;
    y /= d;
    printf("%I64d %I64d\n", x, y);
  }
}
