#include <bits/stdc++.h>
using namespace std;
int a[100007];
long long sum[100007];
int pri[100007], cnt;
bool isp[100007];
long long num[100007];
long long num2[100007];
vector<long long> vec;
void f(long long x) {
  for (int i = 0; pri[i] <= x && i < cnt; ++i) {
    while (x % pri[i] == 0) {
      num2[i]++;
      x /= pri[i];
    }
  }
  if (x > 1) vec.push_back(x);
}
long long powMod(long long a, int n) {
  long long ans = 1;
  while (n) {
    if (n & 1) ans *= a;
    a *= a;
    n >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  for (int i = 2; i * i < 100007; ++i)
    if (!isp[i])
      for (int j = i * i; j < 100007; j += i) isp[j] = 1;
  for (int i = 2; i < 100007; ++i)
    if (!isp[i]) pri[cnt++] = i;
  int x;
  for (int i = 0; i < cnt; ++i) {
    x = n;
    while (x) {
      num[i] += x / pri[i];
      x /= pri[i];
    }
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  sort(a + 1, a + n + 1);
  sum[0] = 0;
  for (int i = 1; i <= n; ++i) sum[0] += a[i];
  a[0] = 0;
  long long tmp = 0;
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + (2 * i - 1LL - n) * (a[i] - a[i - 1]);
    tmp += sum[i];
  }
  long long up = 1, down = 1;
  long long g = gcd(tmp, n);
  up = tmp / g, down = n / g;
  cout << up << " " << down << endl;
  return 0;
}
