#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
long long a[maxn], s[maxn], N;
long long gcd(long long X, long long Y) {
  if (!Y) return X;
  return gcd(Y, X % Y);
}
int main() {
  scanf("%I64d", &N);
  for (int i = 1; i <= N; ++i) scanf("%I64d", &s[i]);
  sort(s + 1, s + N + 1);
  for (int i = 1; i <= N; ++i) a[i] = s[i] - s[i - 1];
  long long S = 0;
  for (int i = 1; i <= N; ++i) S += s[i];
  long long T = -S;
  for (int i = 1; i <= N; ++i) {
    T += S * 2;
    S -= a[i] * (N + 1 - i);
  }
  long long G = gcd(T, N);
  T /= G;
  N /= G;
  printf("%I64d %I64d\n", T, N);
  return 0;
}
