#include <bits/stdc++.h>
using namespace std;
long long Sum[100002];
long long gcd(long long a, long long b) {
  long long r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  int N;
  long long Sini = 0, Stot = 0;
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) {
    scanf("%I64d", &Sum[i]);
    Sini += Sum[i];
  }
  sort(Sum + 1, Sum + N + 1);
  for (int i = 1; i <= N; ++i) Sum[i] += Sum[i - 1];
  for (int i = 2; i <= N; ++i)
    Stot = Stot + (i - 1) * (Sum[i] - Sum[i - 1]) - Sum[i - 1];
  long long x = Sini + 2LL * Stot;
  long long cmmdc = gcd(x, N);
  printf("%I64d %I64d", x / cmmdc, N / cmmdc);
  return 0;
}
