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