#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
const int inf = 0x3f3f3f3f;
template <class T>
void show(T a, int n) {
  for (int i = 0; i < n; ++i) cout << a[i] << ' ';
  cout << endl;
}
template <class T>
void show(T a, int r, int l) {
  for (int i = 0; i < r; ++i) show(a[i], l);
  cout << endl;
}
const int N = 1e6 + 111;
const int mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int k[N];
void play() {
  int n, i, j;
  cin >> n;
  long long ans = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", k + i);
    ans += k[i];
  }
  sort(k, k + n);
  long long tp = 0;
  for (i = 0; i < n; i++) {
    ans += 2 * ((long long)k[i] * (long long)(i)-tp);
    tp += k[i];
  }
  long long x = gcd(ans, n);
  cout << ans / x << ' ' << n / x;
}
int main() {
  play();
  return 0;
}
