#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int i, places, *dists;
  scanf("%d", &places);
  dists = (int *)malloc(sizeof(int) * places);
  for (i = 0; i < places; i++) scanf("%d", &dists[i]);
  std::sort(dists, dists + places);
  long long int fullsum = 0;
  for (i = 0; i < places; i++) fullsum += dists[i];
  long long int sum = 0;
  long long int tosub = 0;
  for (i = 0; i < places; i++) {
    tosub += dists[places - i - 1];
    sum += (long long int)(places - i - 1) * dists[places - i - 1] - fullsum +
           tosub;
  }
  sum = sum * 2;
  for (i = 0; i < places; i++) sum += dists[i];
  long long int mygcd = (long long int)gcd(sum, (long long int)(places));
  printf("%.0lld %.0lld", sum / mygcd, ((long long int)(places)) / mygcd);
  return 0;
}
