#include <bits/stdc++.h>
using namespace std;

int main(void) {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  
  bool is_ok = true;
  for (int i = 1; i <= n; i++) {
    if (i != v[i-1]) {
      is_ok = false;
      break;
    }
  }
  cout << (is_ok ? "Yes" : "No") << endl;
}
#include <bits/stdc++.h>
using namespace std;

const int64_t MOD = 1e9 + 7;
const int64_t MOD2 = 998244353;
const int INF = 2e9;
const long long inf = 1LL<<62;
long long gcd(long long x, long long y) {
  if (x==0||y==0) {
    return x+y;
  }
  if (x%y == 0) {
    return y;
  } else {
    return gcd(y, x%y);
  }
}


int main() {
  int n;
  cin >> n;
  vector<long long> x(n);
  for (int i=0; i<n; i++) {
    cin >> x[i];
  }
  vector<int> ep;
  vector<int> pr(51, 1);
  pr[0] = pr[1] = 0;
  for (int i=2; i<=50; i++) {
    if (pr[i]) {
      for (int x = i*2; x<=50; x += i) {
        pr[x] = 0;
      }
    }
  }
  for (int i=0; i<51; i++) {
    if (pr[i]) ep.push_back(i);
  }
  long long res = inf;
  for (long long bit = 0; bit<(1<<15); bit++) {
    long long ans = 1;
    for (int i=0; i<15; i++) {
      if ((1<<i) & bit) ans *= ep[i];
    }
    int flag = 1;
    for (int i=0; i<n; i++) {
      if (gcd(ans, x[i]) == 1) {
        flag = 0;
        break;
      }
    }
    if (flag) {
      res = min(ans, res);
    }
  }
  cout << res << endl;
}
