#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int64_t x, int64_t y) { return y ? gcd(y, x % y) : x; }
class Solution {
 public:
  pair<int64_t, int64_t> run(int a[], int n) {
    sort(a + 1, a + 1 + n);
    int64_t sum = 0;
    int64_t ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i > 1) ans += static_cast<int64_t>(i - 1) * a[i] - sum;
      sum += a[i];
    }
    ans = 2 * ans + sum;
    int64_t g = gcd(ans, n);
    ans /= g;
    n /= g;
    return pair<int64_t, int64_t>(ans, n);
  }
};
static const int N = 200006;
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  Solution s;
  pair<int64_t, int64_t> r = s.run(a, n);
  cout << r.first << ' ' << r.second << endl;
  return 0;
}
