#include <bits/stdc++.h>
using namespace std;
int n;
int A[100005];
long long GSD(long long a, long long b) {
  if (b == 0) return a;
  if (a == 0) return b;
  if (a >= b)
    return GSD(b, a % b);
  else
    return GSD(a, b % a);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) scanf("%d", &A[i]);
  sort(A, A + n);
  long long ans = 0;
  for (int i = 0; i < (n); ++i)
    ans += (long long)A[i] * (long long)(4 * (i + 1) - 1 - 2 * n);
  long long gsd = GSD(ans, n);
  ans /= gsd;
  n /= gsd;
  cout << ans << " " << n << endl;
}
