#include <bits/stdc++.h>
using namespace std;
long long int sum[100002];
long long int hcf(long long int n1, long long int n2) {
  if (n2 != 0)
    return hcf(n2, n1 % n2);
  else
    return n1;
}
int main() {
  long long int a, b, c, d, e, i, j, p, q;
  long long int x[100002];
  cin >> a;
  for (i = 1; i <= a; i++) cin >> x[i];
  sort(x + 1, x + a + 1);
  for (i = 1; i <= a; i++) {
    sum[i] = sum[i - 1] + x[i];
  }
  p = 0;
  p = p + sum[a];
  for (i = 2; i <= a; i++) {
    p = p + (2 * abs(((i - 1) * x[i]) - sum[i - 1]));
  }
  e = hcf(p, a);
  cout << p / e << " " << a / e;
  return 0;
}
