#include <bits/stdc++.h>
using namespace std;
char p[30] = {'0', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
              'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
              'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
inline long long rd() {
  long long x = 0, flag = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * flag;
}
int n;
long long a[100010];
long long ans1, ans2;
long long c[100010][2];
inline int lowbit(int x) { return x & (-x); }
inline void add(int x, long long v, int op) {
  for (register int i = x; i <= n; i += lowbit(i)) c[i][op] += v;
}
inline long long sum(int x, int op) {
  long long ans = 0;
  for (register int i = x; i > 0; i -= lowbit(i)) ans += c[i][op];
  return ans;
}
inline long long get_gcd(long long x, long long y) {
  while (y) {
    long long tmp = x % y;
    x = y, y = tmp;
  }
  return x;
}
int main() {
  n = rd();
  for (register int i = 1; i <= n; ++i) a[i] = rd(), ans1 += a[i];
  sort(a + 1, a + 1 + n);
  for (register int i = 1; i <= n; ++i) {
    add(i, 1, 0), add(i, a[i], 1);
    ans2 += 1ll * sum(i, 0) * a[i] - sum(i, 1);
  }
  long long g = get_gcd(ans1 + ans2 * 2, n);
  long long x = (ans1 + ans2 * 2) / g;
  n /= g;
  cout << x << " " << n;
  return 0;
}
