#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
const long long MAXLL = 0x0FFFFFFFFFFFFFFFll;
const int MAXINT = 0x0FFFFFFF;
const int MAXN = 100005;
int n;
long long a[MAXN];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long long s = 0;
  for (int i = 0; i < n; i++) {
    int let = i - (n - i - 1);
    s += 2 * a[i] * let;
    s += a[i];
  }
  for (int i = 2; i <= n; i++)
    while (s % i == 0 && n % i == 0) {
      s /= i;
      n /= i;
    }
  cout << s << ' ' << n << '\n';
  return 0;
}
