#include <bits/stdc++.h>
const long long M = 200005;
using namespace std;
inline long long read() {
  char c = getchar();
  long long x = 0, w = 1;
  while (c > '9' || c < '0') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * w;
}
long long n;
long long val[M], Ans;
long long sum[M];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  n = read();
  for (long long i = 1; i <= n; i++) val[i] = read(), Ans += val[i];
  sort(val + 1, val + n + 1);
  for (long long i = 1; i <= n; i++) sum[i] = sum[i - 1] + val[i];
  for (long long i = 1; i <= n; i++) {
    Ans += (sum[n] - sum[i]) - val[i] * (n - i);
    Ans += val[i] * (i - 1) - sum[i - 1];
  }
  long long t = gcd(Ans, n);
  cout << Ans / t << " " << n / t << endl;
  return 0;
}
