#include <bits/stdc++.h>
using namespace std;
unsigned long long ans, sum;
int n;
int a[100005];
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  int pr = 0;
  for (int i = 0; i < n; i++) {
    ans += a[i];
    sum += (unsigned long long)i * (a[i] - pr);
    ans += sum * 2;
    pr = a[i];
  }
  unsigned long long g = gcd(ans, n);
  cout << ans / g << " " << n / g;
  return 0;
}
