#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e5 + 10;
int n;
long long a[MAXN], sum[MAXN];
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long x = 0;
  long long y = n;
  for (int i = 1; i <= n; i++) x += a[i];
  sort(a + 1, a + n + 1);
  sum[0] = 0;
  for (int i = 1; i <= n - 1; i++)
    sum[i] = sum[i - 1] + a[i], x = x + (a[i + 1] * i - sum[i]);
  for (int i = 1; i + i <= n; i++) swap(a[i], a[n - i + 1]);
  sum[0] = 0;
  for (int i = 1; i <= n - 1; i++)
    sum[i] = sum[i - 1] + a[i], x = x + (sum[i] - a[i + 1] * i);
  cout << x / gcd(x, y) << " " << y / gcd(x, y) << endl;
  return 0;
}
