#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int s[maxn], n, i, j;
  long long nume, deno, temp;
  while (scanf("%d", &n) != EOF) {
    nume = 0;
    temp = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &s[i]);
    }
    sort(s, s + n);
    for (i = 1; i < n; i++) {
      temp += s[i] - s[0];
    }
    nume += temp;
    for (i = 1; i < n - 1; i++) {
      temp = temp + (long long)(n - i) * s[i - 1] - (long long)(n - i) * s[i];
      nume += temp;
    }
    nume *= 2;
    for (i = 0; i < n; i++) {
      nume += s[i];
    }
    deno = gcd(nume, (long long)n);
    nume /= deno;
    deno = n / deno;
    printf("%I64d %I64d\n", nume, deno);
  }
  return 0;
}
