#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int f(ll &m, vector<int> &a, int &N) {
    int res = 0;
    rep(i,N) res += m % a.at(i);
    return res;
}

int main() {
    int N;
    cin >> N;
    vector<int> a(N);
    rep(i,N) cin >> a.at(i);
    ll Lcm = a.at(0);
    rep(i,N) Lcm = lcm(Lcm, a.at(i));
    cout << Lcm << endl;
    --Lcm;
    cout << f(Lcm, a, N) << endl;
}
