//Common Header Simple over C++11
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/hash_policy.hpp>
using namespace __gnu_pbds;
using pset=__gnu_pbds ::tree<pair<ll, int>, __gnu_pbds::null_type, less<pair<ll, int> >,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define MIE(x) min_element(all(x))
#define MAE(x) max_element(all(x))
#define make_unique(a) {sort(all(a));a.resize(unique(all(a))-a.begin());}
#define sz(x) ((int)(x).size())
#define clr(x) memset((x),0,sizeof(x));
//#define endl '\n'
#define count2(x) __builtin_popcount(x)
#define count2ll(x) __builtin_popcountll(x)
#define countleadingzero(x) __builtin_clz(x)
#define dd(x) cerr << #x << " = " << x << ' ';
#define de(x) cerr << #x << " = " << x << endl;
//inline char nc() {
//  static char buf[1000000], *p = buf, *q = buf;
//  return p == q && (q = (p = buf) + fread(buf, 1, 1000000, stdin), p == q)
//             ? EOF
//             : *p++;
//}
inline ll rd(){//LLONG_MIN LMAX=9,223,372,036,854,775,807
	ll s=0,w=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
	while(ch>='0' && ch<='9')s=s*10+(ch&15),ch=getchar();
	return s*w;
}
inline int fpow(int a,int b,int p){//a^b mod p; assert(p!=0);
	int ans=1%p,base=a%p;
	for(;b>0;b/=2){
		if(b&1)ans=(long long)ans*base%p;
		base=(long long)base*base%p;
	}
	return ans;
}
int main(){
	ios::sync_with_stdio(0),cin.tie(0);cin.exceptions(ios::badbit | ios::failbit);
	int n;cin>>n;
	set<int>s;
	for(int i=1,v;i<=n;++i){
		cin>>v;
		s.insert(v);
	}
	int c=1;
	for(int i=1;i<=n;++i){
		c=c&&s.count(i);
	}
	if(c){
		cout<<"Yes\n";
	}
	else{
		cout<<"No\n";
	}
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <list>
#include <algorithm>
#include <string.h>
#include <stack>
#include <map>
#include <set>

using namespace std;

int main(int argc, char *argv[])
{
    int n;
    cin >> n;
    vector<bool> a(n, false);
    for (int i = 0; i < n; i++)
    {
        int b;
        cin >> b;
        if (b > n)
        {
            cout << "No";
            return 0;
        }
        b--;
        if (a[b])
        {
            cout << "No";
            return 0;
        }
        a[b] = true;
    }

    cout << "Yes";

    return 0;
}