#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[] = {1, 0, -1, 0, 1, -1, 1, -1};
long long fix_mod(long long x, long long y) { return (y + x % y) % y; }
void fast() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  fast();
  long long n;
  cin >> n;
  vector<long long> v(n + 1);
  for (int i = 1; i <= n; i++) cin >> v[i];
  sort(v.begin(), v.end());
  long long res = 0;
  long long sum = v[1];
  for (long long i = 2; i <= n; i++) {
    res += v[i] * (i - 1) - sum;
    sum += v[i];
  }
  long long x = 2 * res + sum;
  long long y = n;
  long long gc = gcd(x, y);
  cout << x / gc << " " << y / gc << "\n";
}
