#include<bits/stdc++.h>
using namespace std;
#define int              long long int
#define all(xs)          xs.begin(), xs.end()
#define rall(xs)         xs.rbegin(), xs.rend()
#define sz(x)            (int)((x).size())
#define pb               push_back
#define ppb              pop_back
#define pf               push_front
#define ppf              pop_front
#define mp               make_pair
#define ff               first
// #define ss               second
#define prec(n)          fixed<<setprecision(n)
#define debug(x)         cout << (#x) << " is " << (x) << "\n"
#define debug2(x, y)     cout << #x << "=" << x << "," << #y << "=" << y << "\n"
#define debug3(x, y,z)   cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << "\n"
#define yes              cout<<"YES";
#define no               cout<<"NO";
#define ll               cout<<"\n";
#define nil              0
#define inf              1e15
#define inf18            1e18
#define SZ               200005
int gcd(int A,int B){    return (B == 0) ? A : gcd(B, A % B);}
int lcm(int A,int B){    return A * B / gcd(A, B);}
priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> pq;
const int nn=1e5+10;
bool permutation(vector<int>arr, int n)
{
    // Set to check the count
    // of non-repeating elements
    set<int> hash;
 
    int maxEle = 0;
 
    for (int i = 0; i < n; i++) {
 
        // Insert all elements in the set
        hash.insert(arr[i]);
 
        // Calculating the max element
        maxEle = max(maxEle, arr[i]);
    }
 
    if (maxEle != n)
        return false;
 
    // Check if set size is equal to n
    if (hash.size() == n)
        return true;
 
    return false;
}
void solve(){
    int n;cin>>n;
    map<int,int>m;
    set<int> ss;
    vector<int> a(n);
    for(auto &i:a){
        cin>>i;
    }
    if (permutation(a, n))
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
signed main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
    int t=1;
    // cin>>t;
    for(int i=0;i<t;i++){
        // cout<<"Case #"<<i+1<<": "; 
        solve();                                                    
    }
}
#define _GLIBCXX_DEBUG
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

using namespace std;

int main() {
  int N;
  cin >> N;
  vector<int> A(N), check(N);
  for (int &x : A) cin >> x;
  for (int i = 0; i < N; i++) {
    if (check.at(A.at(i) - 1) == 1) {
      cout << "No" << endl;
      return 0;
    }
    check.at(A.at(i) - 1) = 1;
  }
  cout << "Yes" << endl;
  return 0;
}
