#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define DREP(i,s,n) for(int i = (s); i < (n); i++)
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
using ll = long long;
using P = pair<int,int>;
using Pl = pair<long long,long long>;
using veci = vector<int>;
using vecl = vector<long long>;
using vecveci = vector<vector<int>>;
using vecvecl = vector<vector<long long>>;
const int MOD = 1000000007;
const double pi = acos(-1);
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;
    veci A(N); REP(i,N) cin >> A[i];
    sort(A.begin(),A.end());
    veci B(N);
    iota(B.begin(),B.end(),1);
    if(A==B)cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}
#include <bits/stdc++.h> 
using namespace std;
#define ll long long
#define mod 1000000007
#define pb push_back
#define fr(i,x,n) for(ll i=x;i<n;i++)
#define all(x) x.begin(),x.end()
#define fi first
#define se second
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
//-----------------------------------------------------------------------
const int nax =1;
int fac[nax];
int mod_inv[nax];
inline int add(int a, int b){ int c = (a%mod) + (b%mod); if(c >= mod) c -= mod; return c; }
inline int mul(int a, int b){ return ((a%mod) * 1ll * (b%mod)) % mod; }
inline int sub(int a, int b){ int c = (a%mod) - (b%mod); if(c < 0) c += mod; return c; }
inline ll gcd(ll a,ll b){return __gcd(a,b);}
inline ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}
//-----------------------------------------------------------------------
bool comparision(const pair<int,int> &a,const pair<int,int> &b)
{
    if(a.second==b.second)
    return (a.first>b.first);
    else
    return (a.second>b.second);
}
ll power(ll x,ll y) 
{ 
    ll p=mod;
    ll res = 1;
    x=x%p;  
    while(y>0) 
    { 
        if (y&1) res=(res*x)%p;
        y=y>>1; 
        x=(x*x)%p; 
    } 
    return res; 
} 
void pre()
{
    fac[0] = fac[1] = 1;
    for(int i = 2;i<nax;++i){
        fac[i] = mul(i , fac[i-1]);
    } 
    mod_inv[0] = mod_inv[1] = 1;
    for(int i =2;i<nax;++i){
        mod_inv[i] = power(fac[i] , mod - 2);
    }
 
}
ll ncr(ll n, ll r)
{
    if(r > n)return 0LL;
    int ans = mul(fac[n] , mod_inv[r]);
    ans = mul(ans , mod_inv[n-r]);
    return ans;
}
ll count_bit_set(ll n)
{
    int c=0;
    while(n) 
    {
        n&=(n-1);
        c++;
    }
    return c;
}
ll mod_inverse(ll n)
{
    //fermate little theorem
    return power(n,mod-2);
}
void dfs(int i,vector<int> &v)
{
    int n;
    vector<bool> visit(21,0);
    vector<vector<int>> g(21,vector<int>(21,0));
    visit[i]=1;
    v.push_back(i);
    for(int k=1;k<=n;k++){if(visit[k]==0 && g[i][k]>0)dfs(k,v);}
}
ll maxSubArraySum(ll p,ll q,vector<ll> &v)
{
    ll msf =-1e16, meh = 0;
    for (int i = p;i<=q; i++)
    {
        meh = meh + v[i];
        if (msf < meh)msf = meh;
        if(meh<0)meh = 0;
    }
    return msf;
}
void seiveoferatosthenes()
{
    int mx=1e7;
    vector<int> seive(mx+1,1);
    for(int i=2;i*i<=mx;i++)
    {if(seive[i]==1)for(int j=i*i;j<=mx;j+=i)seive[j]=0;}
}
void factorize(ll n,vector<pair<ll,ll>> &v) 
{ 
    ll i,count = 0; 
    while (!(n % 2)) { 
        n >>= 1; 
        count++; 
    } 
    if (count){v.push_back({count,2});}
    for (i=3; i<=sqrt(n);i+= 2) { 
        count=0; 
        while(n%i == 0){ 
            count++; 
            n=n/i; 
        } 
        if(count)v.push_back({count,i}); 
    } 
    if (n>2)v.push_back({1,n});
} 
ll ceil(ll n,ll k)
{
    return (n+k-1)/k;
}
//-----------------------------------------------------------------------
void solve()
{
    //read the instructions
    vector<int> mark(1001,0);
    int n;
    cin>>n;
    int ar[n];
    fr(i,0,n){cin>>ar[i];mark[ar[i]]=1;}
    fr(i,1,n+1){if(mark[i]==0){cout<<"No"<<endl;return;}}
    cout<<"Yes"<<endl;
}
/*-----------------------------------------------------------------------
1.Read the question properly(name).
2.Read the question properly(name):|
3.Cheak the constraints.
4.Better to look for edge cases and examples.
5.why the contraints and values are like that?{sum always take ll}
6.think the opposite way
-----------------------------------------------------------------------*/
signed main()
{
    fast;
    int test=1;
    //cin>>test;
    //pre();
    for(int i=1;i<=test;i++)
    {
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}