#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main(void) {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  long long lcm = 1;
  for (int i = 0; i < (n); ++i) {
    lcm = (lcm * (long long)(a[i])) / gcd(lcm, (long long)(a[i]));
  }
  cout << lcm << endl;
  long long ans = 0;
  for (int i = 0; i < (n); ++i) {
    ans += (lcm - 1) % (long long)(a[i]);
  }
  cout << ans << endl;
  return 0;
}
