#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int x = 0, s = 0, m = 0;
  long long int a[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
    m = max(m, a[i]);
  }
  x = n * m - s;
  long long int ans = 0;
  for (long long int i = 1; i <= sqrt(x); i++) {
    if (x % i == 0) {
      int flag = 1;
      for (int j = 0; j < n; j++) {
        if ((m - a[j]) % i != 0) flag = 0;
      }
      if (flag) {
        ans = max(ans, i);
      }
      flag = 1;
      for (int j = 0; j < n; j++) {
        if ((m - a[j]) % (x / i) != 0) flag = 0;
      }
      if (flag) {
        ans = max(ans, x / i);
      }
    }
  }
  cout << (n * m - s) / ans << " " << ans;
}
