#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
T min(T a, U b) {
  if (a < (U)b) return a;
  return b;
}
template <class T, class U>
T max(T a, U b) {
  if (a < (U)b) return b;
  return a;
}
const int INF = 1000000000;
const long long MOD = 1000000009;
const double eps = 1e-9;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  long long A[N];
  for (int i = 0; i < N; ++i) cin >> A[i];
  sort(A, A + N);
  long long sum = 0;
  for (int i = 0; i < N; ++i) sum += A[i];
  long long zn = (N);
  long long ci = sum;
  long long cursum = 0;
  long long curzn = (1 - N);
  for (int i = 0; i < N; ++i) {
    cursum += curzn * A[i] * 2;
    curzn += 2;
  }
  ci += cursum;
  long long g = gcd(ci, zn);
  ci /= g;
  zn /= g;
  cout << ci << " " << zn;
  return 0;
}
