#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
void run();
int main() {
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(16);
  run();
}
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
unsigned long long a[100100];
unsigned long long sufsum[100100];
void run() {
  unsigned long long n;
  cin >> n;
  for (int i = (0); i < (n); ++i) cin >> a[i];
  sort(a, a + n);
  unsigned long long x = 0;
  sufsum[n] = 0;
  for (int j = n - 1; j >= 0; --j) sufsum[j] = sufsum[j + 1] + a[j];
  for (int i = (0); i < (n); ++i) {
    x -= 2 * (n - i - 1) * a[i];
    x += 2 * sufsum[i + 1];
  }
  x += sufsum[0];
  unsigned long long g = gcd(n, x);
  x /= g;
  n /= g;
  cout << x << " " << n << "\n";
}
