#include <bits/stdc++.h>
using namespace std;
const int MAX_N = int(1e5) + 10;
int a[MAX_N], n;
long long GCD(long long a, long long b) {
  if (b > a) return GCD(b, a);
  long long r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  scanf("%d", &n);
  int i;
  long long up = 0;
  long long down = n;
  for (i = 1; i <= n; ++i) scanf("%d", a + i);
  sort(a + 1, a + i);
  for (i = 1; i <= n; ++i) {
    up += (1LL) * a[i] * (i - 1);
    up -= (1LL) * a[i] * (n - i);
  }
  up *= 2LL;
  for (i = 1; i <= n; ++i) up += a[i];
  const long long GC = GCD(up, down);
  up /= GC, down /= GC;
  cout << up << " " << down << "\n";
  return 0;
}
