#include <bits/stdc++.h>
using namespace std;
const int max_n = 100005;
const int max_p = 100005;
int n;
int a[max_n];
long long S, s[max_n];
bool p[max_p + 5];
vector<int> P;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    S += (long long)a[i];
  }
  sort(a, a + n);
  for (int i = 1; i < n; i++) {
    s[i + 1] = s[i] + (long long)i * (long long)(a[i] - a[i - 1]);
    S += (long long)2 * s[i + 1];
  }
  fill(p, p + max_p, 1);
  for (int i = 2; i < max_p; i++)
    for (long long j = (long long)i * (long long)i; j < (long long)max_p;
         j += (long long)i)
      p[j] = 0;
  for (int i = 2; i < max_p; i++)
    if (p[i]) P.push_back(i);
  for (int i = 0; i < (int)P.size(); i++) {
    while (n % P[i] == 0 and S % (long long)P[i] == 0) {
      n /= P[i];
      S /= (long long)P[i];
    }
  }
  cout << S << " " << n << "\n";
  return 0;
}
