#include <bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef ONLINE_JUDGE
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// debug & operator << (debug & dd, P p) { dd << ", " << p.x << ", " << p.y << ")"; return dd; }

#define ll long long
#define ld long double

void test_case() {
    int n;
    cin >> n;
    set<int> a;
    for(int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        if(x <= 0 || x > n) {

        } else {
            a.insert(x);
        }
    }
    if(a.size() == n) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

int main() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
        freopen("error.txt", "w", stderr);
    #endif
    
    int T = 1;
    // cin >> T;
    while(T--) {
        test_case();
    } 
    return 0;
}
#include <iostream>
#include<string>
#include <math.h>
#include<vector>
#include<algorithm>
#include <iomanip>
#include<map>
using ll = long long;
using namespace std;

int main() {
	int n; cin >> n;
	vector<int>a(n + 1);
	for (int i = 1; i <= n; i++) {
		int x; cin >> x;
		a[x]++;
	}
	bool ok = true;
	for (int i = 1; i <= n; i++) {
		if (a[i] > 1)ok = false;
	}
	if (ok)cout << "Yes" << endl;
	else cout << "No" << endl;
}