#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:32777216")
using namespace std;
const long double pi = acos(-1.0);
const int INF = 1000000000;
const int MOD = 1000000007;
const double EPS = 1e-7;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  long long r = 0;
  vector<int> a(n);
  for (int(i) = (0); (i) < (n); ++(i)) {
    cin >> a[i];
    r += abs(a[i]);
  }
  sort((a).begin(), (a).end());
  long long s = 0;
  for (int(i) = (1); (i) < (a.size()); ++(i)) {
    s += 1LL * i * (a[i] - a[i - 1]);
    r += 2 * s;
  }
  long long p = n;
  long long g = gcd(r, p);
  cout << r / g << ' ' << p / g << endl;
  return 0;
}
