#include <bits/stdc++.h>
using namespace std;
long long n, v[100005], nr, num, sum, sumdif, sdt;
long long cmmdc(long long a, long long b) {
  for (long long c; b; c = a % b, a = b, b = c)
    ;
  return a;
}
int main() {
  cin >> n;
  num = n;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
    sum += v[i];
  }
  sort(v + 1, v + n + 1);
  for (int i = 2; i <= n; ++i) sumdif += v[i] - v[1];
  sdt = sumdif;
  for (int i = 2; i <= n; ++i) {
    sumdif -= ((v[i] - v[i - 1]) * (n - i + 1));
    sdt += sumdif;
  }
  nr = sum + 2 * sdt;
  cout << nr / cmmdc(nr, num) << ' ' << num / cmmdc(nr, num);
  return 0;
}
