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