#include <bits/stdc++.h>
using namespace std;
long long a, b, c, i, j, k;
long long x[100005];
long long sum;
long long ans;
long long gcd(long long w, long long e) {
  long long r, gcd;
  if (w == 0 || e == 0)
    return gcd = 1;
  else {
    r = (w % e);
    while (r < 0 || r > 0) {
      w = e;
      e = r;
      r = (w % e);
    }
    gcd = e;
  }
  return gcd;
}
int main() {
  scanf("%lld", &a);
  for (i = 0; i < a; i++) {
    scanf("%lld", &x[i]);
  }
  sort(x, x + a);
  sum = x[0];
  for (i = 1; i < a; i++) {
    ans = ans + abs(x[i] * (i)-sum);
    sum += x[i];
  }
  ans = ans * 2;
  long long back = a;
  long long op = gcd(gcd(ans, back), gcd(sum, back));
  if (op != 1) {
    ans = ans / op;
    back = back / op;
    sum = sum / op;
  }
  ans += sum;
  op = gcd(ans, back);
  if (op != 1) {
    ans = ans / op;
    back = back / op;
    sum = sum / op;
  }
  cout << ans << " " << back;
}
