#include <bits/stdc++.h>
using namespace std;
unsigned long long dp[100002];
unsigned long long dp2[100002];
unsigned long long N;
unsigned long long T[100002];
unsigned long long n = 0, d = 1;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b > a) return gcd(b, a);
  return (b > 0) ? (gcd(b, a % b)) : a;
}
void sup() {
  unsigned long long k;
  while ((k = gcd(n, d)) > 1) {
    n /= k;
    d /= k;
  }
}
int main() {
  memset(dp, 0, sizeof(dp));
  memset(dp2, 0, sizeof(dp2));
  cin >> N;
  for (unsigned long long i = 1; i <= N; i++) cin >> T[i];
  T[0] = 0;
  sort(T, T + N + 1);
  for (unsigned long long i = 1; i <= N; i++)
    dp[i] = dp[i - 1] + i * (T[i] - T[i - 1]);
  for (unsigned long long i = N - 1; i > 0; i--)
    dp2[i] = dp2[i + 1] + (N - i) * (T[i + 1] - T[i]);
  for (unsigned long long i = 1; i <= N; i++) n += dp[i];
  for (unsigned long long i = N - 1; i > 0; i--) n += dp2[i];
  d = N;
  sup();
  cout << n << " " << d << endl;
}
