#include <bits/stdc++.h>
using namespace std;
int n;
int a[100100];
long long sum;
long long gcd(long long u, long long v) {
  if (v == 0) return u;
  return gcd(v, u % v);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  long long res = 0;
  sort(a + 1, a + n + 1);
  sum = 0;
  for (int i = 1; i <= n; i++) {
    res += (long long)a[i] * (i - 1) - sum;
    sum = sum + a[i];
  }
  res *= 2;
  for (int i = 1; i <= n; i++) res += a[i];
  long long sol = gcd(res, n);
  cout << res / sol << " " << n / sol;
  return 0;
}
