#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T> using vt = vector<T>;
template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pb push_back
#define SZ(x) ((int)((x).size()))
#define EACH(x, a) for (auto& x: a)
#define FOR(i,s,n) for (ll i = (s); (i) < (n); ++i)
#define FORD(i,s,l) for (ll i = (s); (i) >= l; --i)
#define F first
#define S second
#define TC int __tc; cin >> __tc; FOR(case_num,1,__tc+1)
#define TEST(x,i) ((x)&(1ll<<(i)))
#define SET(x,i) ((x)|(1ll<<(i)))
#define FLIP(x,i) ((x)^(1ll<<(i)))
#define CLEAR(x,i) ((x)&~(1ll<<(i)))
const double pi = 4 * atan(1);
using ll = long long;
using pll = pair<ll, ll>;


mt19937 mt_rng(chrono::steady_clock::now().time_since_epoch().count());
ll randint(ll a, ll b) {
	return uniform_int_distribution<ll>(a, b)(mt_rng);
}

template<class T> bool umin(T& a, const T& b) {
	return b<a?a=b, 1:0;
}

template<class T> bool umax(T& a, const T& b) { 
	return a<b?a=b, 1:0;
}

template<class ForwardIterator> void read(ForwardIterator first,
		ForwardIterator last) {
	while (first != last) {
		cin >> (*first);
		++first;
	}
}

template<class T> void read(vector<T> &v) {
	read(v.begin(),v.end());
}

template<class ForwardIterator> void print(ForwardIterator first,
		ForwardIterator last, string sep = " ", string end = "\n") {
	bool ft = true;
	while (first != last) {
		if (!ft) {cout << sep;} else {ft = false;}
		cout << (*first);
		++first;
	}
	cout << end;
}

template<typename T> void print(vector<T> &v, string sep = " ", string end = "\n") {
	print(v.begin(),v.end(),sep,end);
}

template<typename T1, typename T2>
std::ostream& operator<<(std::ostream &o, const pair<T1, T2> &p) {
	return o << p.F << " " << p.S;
}

template<typename T>
vector<int> argsort(const vector<T> &v, function<bool(T,T)> cmp) {
    vector<int> indices(v.size());
    iota(indices.begin(), indices.end(), 0);
    sort(indices.begin(), indices.end(),[&v,&cmp](int left, int right) -> bool {return cmp(v[left],v[right]);});
    return indices;
}

template<typename T>
vector<int> argsort(const vector<T> &v) {
    return argsort<T>(v, less<T>());
}

template<typename T, typename T2>
vector<int> argsort(const vector<T> &v, function<T2(T)> key) {
	vector<T2> v2(v.size());
	for(int i = 0; i < SZ(v); i++) v2[i]=key(v[i]);
    return argsort<T2>(v2);
}

inline ll floorDiv(ll x, ll y) {
	ll d = x / y;
	ll r = x % y;
	return r ? (d - ((x < 0) ^ (y < 0))) : d;
}

ll ceilDiv(ll x, ll y) {
	return -floorDiv(-x, y);
}

ll bin_search(ll lo, ll hi, function<bool(ll)> predicate) {
	int sign = lo <= hi ? 1 : -1;
	lo *= sign;
	hi *= sign;
	hi++;
	while (lo < hi) {
		ll mid = lo + floorDiv(hi-lo, 2);
		if (!predicate(sign * mid)) {
			lo = mid + 1;
		} else {
			hi = mid;
		}
	}
	return sign * lo;
}
const ll MOD = 1000000007;
const int MAXN = 200005;

bool solve() {
	int n;
	cin >> n;
	vector<int> v(n);
	read(v);
	sort(v.begin(),v.end());
	for (int i = 0; i < n; i++) {
		if (v[i] != i+1) {
			return false;
		}
	}
	return true;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	cout << (solve() ? "Yes" : "No") << "\n";
	
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long INF = 1LL << 60;

ll gcd(ll a, ll b) {
    if (b==0) return a;
    else return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
    return a * b / gcd(a, b);
}


int main(){
  int n;
  cin >> n;

  ll ans = 1;
  REP(i, 2, n){
    ans = lcm(ans, (ll)i); 
  }

  ans++;
  cout << ans << endl;

  return 0;
}
