#include <bits/stdc++.h>
using namespace std;
int gcd(long long int a, long long int b) {
  while (1) {
    if (b == 0) return a;
    if (a == 0) return b;
    if (a == b) return a;
    if (a > b) swap(a, b);
    b -= a * (b / a);
  }
}
int main() {
  long long int n, a[100002];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(&a[0], &a[n]);
  long long int sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += (n - 2 * i + 1) * a[n - i] * 2;
    sum += a[i - 1];
  }
  int g = gcd(sum, n);
  cout << sum / g << " " << n / g << endl;
}
