#include <bits/stdc++.h>
#define st string
#define ll long long
#define ld long double
#define ull unsigned long long
using namespace std;

void solve() {
	int n;
	cin >> n;
	int z = 1, e;
	vector <int> ss;
	for (int i = 0; i < n; i++) {
		cin >> e;
		ss.push_back(e);
	}
	sort(ss.begin(), ss.end());
	for (auto i : ss) {
		if (i != z) {
			cout << "No";
			return;
		}
		z++;
	}
	cout << "Yes";
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
    int tt = 1;
	//cin >> tt;
    while (tt--) solve();
    
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define max(a, b) (a < b ? b : a)
#define min(a, b) ((a > b) ? b : a)
#define io ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define SCD(t) scanf("%d",&t)
#define SCLD(t) scanf("%ld",&t)
#define SCLLD(t) scanf("%lld",&t)
#define SCC(t) scanf("%c",&t)
#define SCS(t) scanf("%s",t)
#define SCF(t) scanf("%f",&t)
#define SCLF(t) scanf("%lf",&t)
#define mem(a, b) memset(a, (b), sizeof(a))
#define FOR(i, j, k) for (int i = j ; i < k ; ++i)
#define FORR(i, j, k) for (int i = j; i > k; --i)
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define foreach(i, a) for(auto i: a)
#define forEach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define INF 1000000000000000003
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef pair<int, int> PI;
typedef map<int, int> mpii;
#define F first
#define S second
#define pb push_back
#define POB pop_back
#define MP make_pair


int main()
{
     io;
     // int t; cin>>t; while(t--){
     //   while(1){
    int n;
    cin>>n;
    int a[n];
    
    set<int> s;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    for(int i=0;i<n;i++)
    {
        s.insert(a[i]);
    }
    if(s.size()==n)
    cout<<"Yes";
    else
    cout<<"No";
    
   /* } */  return 0;}
