#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000 + 5;
const int MOD = 1000 * 1000 * 1000 + 7;
const long double EPS = 1e-8;
int n;
vector<long long> a;
long long gcd(long long a, long long b) {
  while (b) a %= b, swap(a, b);
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  long long res = 0;
  for (int i = 3 - 2 * n, j = 0; j < n; i += 4, ++j) res += i * a[j];
  long long g = gcd(res, n);
  res /= g;
  n /= g;
  cout << res << " " << n << "\n";
  return 0;
}
