#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const int maxn = 101000;
int a[maxn];
int n;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long sum;
  long long num = 1;
  sort(a + 1, a + n + 1);
  sum = a[1];
  long long ans = 0;
  for (int i = 2; i <= n; i++) {
    ans += a[i] * num - sum;
    num++;
    sum += a[i];
  }
  ans *= 2;
  for (int i = 1; i <= n; i++) {
    ans += a[i];
  }
  long long tmp = gcd(ans, n);
  long long up = ans / tmp;
  long long down = n / tmp;
  cout << up << " " << down << endl;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  solve();
  return 0;
}
