#include <bits/stdc++.h>
using namespace std;
long long a[100010], lsum[100010], rsum[100010];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long n, ans;
  ;
  cin >> n;
  ans = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], ans += a[i];
  sort(a + 1, a + 1 + n);
  lsum[0] = 0;
  for (int i = 1; i <= n; i++) lsum[i] = lsum[i - 1] + a[i];
  rsum[n + 1] = 0;
  for (int i = n; i >= 1; i--) rsum[i] = rsum[i + 1] + a[i];
  for (int i = 1; i <= n; i++) {
    ans += (i - 1) * a[i] - lsum[i - 1];
    ans += rsum[i + 1] - (n - i) * a[i];
  }
  long long g = gcd(ans, n);
  cout << ans / g << " " << n / g << endl;
}
