#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592654;
const char fi[] = "A.inp", fo[] = "A.out";
const int DBG = 1;
const int INF = int(1e9);
const long long MAXD = 2147483647;
const int MAXN = 10 + 100000;
int n;
int a[MAXN];
long long s[MAXN];
long long res;
long long gcd(long long x, long long y) {
  long long z = x % y;
  while (z) {
    x = y;
    y = z;
    z = x % y;
  }
  return y;
}
int main() {
  n = ({
    int n;
    scanf("%d", &n);
    n;
  });
  for (int i = (1), _b = (n); i <= n; ++i)
    a[i] = ({
      int n;
      scanf("%d", &n);
      n;
    });
  sort(a + 1, a + n + 1);
  s[0] = 0;
  for (int i = (1), _b = (n); i <= n; ++i) s[i] = s[i - 1] + a[i];
  res = s[n];
  for (int i = (1), _b = (n); i <= n; ++i)
    res += (long long)(i - 1) * a[i] - s[i - 1] + (s[n] - s[i]) -
           (long long)(n - i) * a[i];
  long long k = gcd(res, (long long)n);
  res /= k;
  n /= k;
  printf("%I64d %d\n", res, n);
  return 0;
}
