#include <bits/stdc++.h>
using namespace std;
int n;
long long vet[100000];
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  long long a = 0, ca = 0, b = 0, cb = n, c = n, g, d = 0;
  for (int i = 0; i < n; ++i) scanf("%lld", vet + i), b += vet[i], d += vet[i];
  sort(vet, vet + n);
  for (int i = 0; i < n; ++i) {
    b -= vet[i];
    cb--;
    d += b - cb * vet[i];
    d += ca * vet[i] - a;
    ca++;
    a += vet[i];
  }
  g = gcd(c, d);
  c /= g;
  d /= g;
  cout << d << ' ' << c << endl;
}
