#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long a[100100], s[100100];
int main() {
  long long sum = 0;
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    s[i] = a[i];
    s[i] += s[i - 1];
  }
  sum = s[n];
  for (int i = n; i > 0; i--) {
    sum += (a[i] * (i - 1) - s[i - 1]) << 1LL;
  }
  long long g = gcd(sum, n);
  cout << sum / g << " " << n / g << endl;
  return 0;
}
