#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a.begin(), a.end());
  long long s1 = accumulate(a.begin(), a.end(), 0LL);
  long long s2 = 0, leftsum = 0, rightsum = s1;
  for (int i = 0; i < a.size(); i++) {
    s2 += (1LL * i * a[i] - leftsum);
    leftsum += a[i];
    rightsum -= a[i];
    s2 += (rightsum - (1LL * (n - i - 1) * a[i]));
  }
  long long num = s1 + s2, den = n;
  long long c, A = num, b = den;
  while (b) {
    c = A % b;
    A = b;
    b = c;
  }
  num /= A;
  den /= A;
  cout << num << " " << den << endl;
}
