#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
using namespace std;
long long a[100005];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main(void) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  long long tot = 0, sum = 0;
  long long x = 0;
  for (int i = 1; i <= n; i++) {
    x += (i - 1) * (a[i] - a[i - 1]);
    tot += x;
  }
  for (int i = 1; i <= n; i++) sum += a[i];
  long long a = tot * 2 + sum, b = n;
  long long tmp = gcd(a, b);
  a /= tmp, b /= tmp;
  cout << a << " " << b << endl;
}
