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