#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  long long sum1 = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    sum1 += v[i];
  }
  sort(v.begin(), v.end());
  long long sum2 = 0;
  for (int i = (1); i < (n); i++) {
    sum2 += (v[i] - v[i - 1]) * (n - i) * (i);
  }
  long long num, den, g;
  num = 2 * sum2 + sum1;
  den = n;
  g = gcd(num, den);
  num /= g, den /= g;
  cout << num << " " << den << "\n";
  return 0;
}
