#include <bits/stdc++.h>
using namespace std;
inline void print(char pt) { printf("%c\n", pt); }
inline void print(int pt) { printf("%d\n", pt); }
inline void print(long long pt) { printf("%I64d\n", pt); }
inline void print(double pt) { printf("%.20f\n", pt); }
inline void print(char pt[]) { printf("%s\n", pt); }
inline void print() { printf("\n"); }
inline int scan(int& pt) { return scanf("%d", &pt); }
inline int scan(char& pt) { return scanf("%c", &pt); }
inline int scan(long long& pt) { return scanf("%I64d", &pt); }
inline int scan(double& pt) { return scanf("%lf", &pt); }
inline int scan(char pt[]) { return scanf("%s", pt); }
using namespace std;
class Reader {
  char buf[1048576], b;
  int bi, bz;
  void read() {
    if (bi == bz) {
      bi = 0;
      bz = fread(buf, 1, 1048576, stdin);
    }
    b = bz ? buf[bi++] : 0;
  }
  void skip() {
    while (b > 0 && b <= 32) read();
  }

 public:
  Reader() {
    bi = bz = 0;
    read();
  }
  unsigned nextInt() {
    unsigned v = 0;
    for (skip(); b > 32; read()) v = v * 10 + b - 48;
    return v;
  }
} reader;
int cnt_sort_cnts[10000008];
void cnt_sort(int* start, int* end, int maxa = 1 << 31) {
  if (maxa == 1 << 31) {
    for (int* it = start; it != end; it++) {
      *it > maxa ? maxa = *it : 0;
    }
  }
  int lena = end - start;
  if (lena * (31 - __builtin_clz(lena)) < maxa) {
    sort(start, end);
    return;
  }
  memset(cnt_sort_cnts, 0, sizeof(int) * (maxa + 1));
  for (int* it = start; it != end; it++) {
    cnt_sort_cnts[*it]++;
  }
  int* nowpos = start;
  for (int i = 0; i <= maxa; i++) {
    while (cnt_sort_cnts[i]) {
      cnt_sort_cnts[i]--;
      *nowpos = i;
      nowpos++;
      if (nowpos == end) return;
    }
  }
}
inline int gcd(int x, int y) {
  int t;
  while (y != 0) {
    t = y;
    y = x % y;
    x = t;
  }
  return x;
}
int n;
int a[100000];
int main() {
  n = reader.nextInt();
  int maxa = 1 << 31;
  long long fenzi = 0;
  for (int i = 0; i < n; i++) {
    a[i] = reader.nextInt();
    a[i] > maxa ? maxa = a[i] : 0;
    fenzi += a[i];
  }
  cnt_sort(a, a + n);
  long long suma = 0;
  for (int i = 0; i < n; i++) {
    fenzi += ((long long)a[i] * i - suma) << 1;
    suma += a[i];
  }
  int tll = gcd(fenzi % n, n);
  print(fenzi / tll);
  print(n / tll);
  return 0;
}
