#include <bits/stdc++.h>
using namespace std;
int A[100005];
long long sum[100005];
long long gcd(long long n, long long m) { return m ? gcd(m, n % m) : n; }
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  sum[0] = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
  }
  sort(A + 1, A + n + 1);
  for (i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + A[i];
  }
  long long ans = 0;
  for (i = 1; i <= n; i++) {
    ans += A[i];
    long long temp = 1LL * (i - 1) * A[i] - sum[i - 1];
    ans += temp * 2;
  }
  long long cd = gcd(ans, n);
  cout << ans / cd << " " << n / cd << endl;
  return 0;
}
