#include <bits/stdc++.h>
using namespace std;
vector<long long int> arr;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  long long int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    arr.push_back(0);
    cin >> arr[i];
  }
  sort(arr.begin(), arr.end());
  long long int sum = 0;
  long long int help = 0;
  for (int i = 0; i < N; i++) {
    help += arr[i];
    sum += -((long long)(N - 1 - 2 * i) * arr[i]);
    sum += -((long long)(N - 1 - 2 * i) * arr[i]);
  }
  sum += help;
  help = gcd(sum, N);
  sum /= help;
  N /= help;
  cout << sum << " " << N << endl;
  return 0;
}
