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