#include <bits/stdc++.h>
using namespace std;
long long a[100100];
long long b[100100];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> b[i];
  sort(b + 1, b + n + 1);
  long long ans = 0;
  long long answer = b[1];
  for (int i = 2; i <= n; i++) {
    ans += b[i];
    answer += 2LL * (b[i] - b[i - 1]) * (long long)(n - i + 1) * (i - 1);
  }
  answer += ans;
  long long tp = gcd(answer, n);
  answer /= tp;
  n /= tp;
  cout << answer << ' ' << n << endl;
  return 0;
}
