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