#include <bits/stdc++.h>
using namespace std;
int V[100010];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  long long s1 = 0, s2 = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &V[i]);
    s1 += V[i];
  }
  sort(V, V + n);
  for (int i = 1; i < n; i++) s2 += (long long)i * (n - i) * (V[i] - V[i - 1]);
  long long num = 2 * s2 + s1, g = gcd(num, n);
  cout << num / g << " " << n / g << endl;
}
