#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const int XD = 100100;
int a[XD];
int b[XD];
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  a[n] = 0;
  sort(a, a + n + 1);
  for (int i = 0; i < n; ++i) {
    b[i] = a[i + 1] - a[i];
  }
  long long sum = 0, acc = 0;
  for (int i = 0; i < n; ++i) {
    acc += b[i];
    sum += 2LL * b[i] * (n - i) * (i + 1) - acc;
  }
  printf("%I64d %I64d", sum / gcd(sum, n), n / gcd(sum, n));
  return 0;
}
