#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include<ext/rope>

#define pb push_back
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define ld long double
#define TIME 1.0*clock()/CLOCKS_PER_SEC
#define pii pair < int , int >
#define Endl '\n'

#pragma GCC optimize("Ofast")

using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

template <typename T>
    using ordered_set = tree <T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

mt19937 gen(chrono::system_clock::now().time_since_epoch().count());

const int mod = 1e9 + 7;
const int FFTM = 998244353;

const int SX[4] = {0 , 1 ,  - 1 , 0};
const int SY[4] = {1 , 0 , 0 ,  - 1};
const int rx[8] = {1,  - 1, 0, 0, 1, 1, -1, -1};
const int ry[8] = {0, 0, 1,  - 1, 1,  - 1, 1, -1};
const int kx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ky[8] = {2, -2, 2, -2, 1, -1, 1, -1};

typedef cc_hash_table< int, int, hash<int>, equal_to<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true>> ht;

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("railroad.in", "r", stdin);
//    freopen("railroad.out", "w", stdout);
#endif
    int n;
    cin >> n;
    int a[n];
    for (int i = 0;i < n; ++i)cin >> a[i];
    sort(a, a + n);
    if (a[0] != 1){
        cout << "No" << endl;
        return 0;
    }
    for (int i = 1;i < n; ++i){
        if (a[i] - a[i - 1] != 1){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

// Powered by CP Editor (https://cpeditor.org)

//a+b = (a^b) + 2*(a&b)
//b^c = (a^b)^(a^c) 
//gcd(x,y) = gcd(x-y,y)
//if n = 5000 then complexity cannot be (n^2*log(n)) means no map ,no sets
//check for long long overflow if input is large
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
//#define mod 1000000007
#define mod 998244353
#define pb push_back
#define ll long long
#define fi first
#define se second
#define vi vector<int> 
#define pii pair<int,int>
#define mii map<int,int>
#define loop(i,n) for(int i=0;i<n;i++) 
#define pp  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) 
#define fill(a,b) memset(a, b, sizeof(a))
#define all(x) (x).begin(), (x).end()
 
#define en cout<<"\n"

#define trace(x) cout<<#x<<": "<<x<<" "<<endl
#define trace2(x,y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x,y,z) cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a,b,c,d) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
 
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
//member functions :
//1. order_of_key(k) : number of elements strictly lesser than k
//2. find_by_order(k) : k-th element in the set
const long long INF = 2000000000000000000;

long long power(long long a,long long b){
    long long ans=1;
    while(b>0){
        if(b&1){ans=(ans*a)%mod;}
                a=(a*a)%mod;
                b>>=1;
        }
    return ans; 
}

void solve()
{
	int n;
	cin>>n;
	int ar[n];
	loop(i,n) cin>>ar[i];
	sort(ar,ar+n);
	for(int i=0;i<n;i++)
	{
		if(ar[i]!=i+1)
		{
			cout<<"No";return;
		}
	}
	cout<<"Yes";
}

int32_t main() 
{
pp;
int test=1;
// cin>>test;
while(test--)
{
	solve();
	en;
}
return 0 ;
}