#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
const long double PI = 3.14159265358979323846;
const long double gammama = 0.57721566490153286060;
const int INF = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 9;
const long double eps = 1e-10;
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;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a.begin(), a.end());
  long long res = 0;
  long long sum = 0;
  long long ab = 0;
  for (int i = 0; i < n; ++i) {
    res += a[i] * i;
    res -= sum;
    sum += a[i];
    ab += abs(a[i]);
  }
  long long b = res * 2 + ab;
  long long c = n;
  long long d = gcd(b, c);
  cout << b / d << " " << c / d << endl;
  return 0;
}
