#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<string>
#include<iterator>
#include<string>
#include<sstream>
#include<cassert>
#include<ctime>
#include<cmath>
#define MP make_pair
#define PB push_back
#define X first
#define Y second
#define oo 2000000000
#define MOD 1000000007
#define LL long long int
#define PII pair<int,int>
#define DEBUG 0
#define trace1(x) cerr << #x << ": " << x << endl;
#define trace2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z) cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
using namespace std;
LL ar[100005];
LL gcd(LL a,LL b){
return b ? gcd(b,a%b) : a;
}
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++) scanf("%I64d",&ar[i]);
sort(ar,ar+n);
LL ss=0,ans=0;
for(int i=0;i<n;i++){
ans += ((ar[i]*i) - ss);
ss += ar[i];
}
LL num = ss + 2*ans;
LL den = n;
LL g = gcd(num,den);
cout << num/g << " " << den/g << endl;
return 0;
}
I2luY2x1ZGU8Y3N0ZGlvPgojaW5jbHVkZTxjc3RkbGliPgojaW5jbHVkZTxpb3N0cmVhbT4KI2luY2x1ZGU8YWxnb3JpdGhtPgojaW5jbHVkZTx2ZWN0b3I+CiNpbmNsdWRlPGNzdHJpbmc+CiNpbmNsdWRlPG1hcD4KI2luY2x1ZGU8c2V0PgojaW5jbHVkZTxzdGFjaz4KI2luY2x1Z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