#include <bits/stdc++.h>
int a[100010];
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n, i;
  long long s1, s2, g, cur, last;
  while (~scanf("%d", &n)) {
    last = s1 = s2 = 0;
    for (i = 1; i <= n; i++) scanf("%d", &a[i]), s1 += a[i];
    std::sort(a + 1, a + n + 1);
    for (i = 2; i <= n; i++)
      cur = last + (1LL * a[i] - a[i - 1]) * (i - 1LL), s2 += cur, last = cur;
    s1 = s1 + s2 * 2LL;
    s2 = n;
    g = gcd(s1, s2);
    printf("%I64d %I64d\n", s1 / g, s2 / g);
  }
  return 0;
}
