#include <bits/stdc++.h>
using namespace std;
int A[100100];
long long N;
long long gcd(long long a, long long b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main(int argc, char* argv[]) {
  scanf("%I64d", &N);
  long long ans = 0;
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
    ans = ans + A[i];
  }
  sort(A, A + N);
  for (int i = 1; i < N; i++) {
    long long t = (long long)(A[i] - A[i - 1]) * (i) * (N - i);
    ans += t << 1;
  }
  long long x = gcd(ans, N);
  ans /= x;
  N /= x;
  printf("%I64d %I64d\n", ans, N);
  return 0;
}
