#include <bits/stdc++.h>
using namespace std;
long long n, arr[100005];
long long gcd(long long a, long long b) {
  if (a > b) return gcd(b, a);
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  long long s = 0, res = 0;
  for (int i = 1; i < n; i++) s += arr[i] - arr[0];
  res += s;
  for (int i = 1; i < n; i++) {
    s -= (arr[i] - arr[i - 1]) * (n - i);
    res += s;
  }
  long long d = 0;
  for (int i = 0; i < n; i++) d += arr[i];
  long long num = 2 * res + d, denom = n, g;
  g = gcd(num, denom);
  cout << num / g << " " << denom / g << endl;
}
