#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using Graph = vector<vector<int>>;
using vi = vector<int>;
using vll = vector<ll>;
using vs = vector<string>;
using p_qi = priority_queue<int>;
const int INF = 1001001001;

// Input
int n;
vi a;

int main() {
    cin >> n;
    a = vi(n);
    rep(i, n) cin >> a[i];
    set<int> s;
    rep(i, n) s.insert(a[i]);
    if (s.size() != n) {
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;

    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define lli               long long int
#define vi                vector<int>
#define ii                pair<int,int>
#define all(v)            v.begin(),v.end()
#define getunique(v)      {v.erase(unique(v.begin(),v.end()),v.end());}
#define pb                push_back
#define ff                first
#define ss                second
#define endl              "\n"
#define fast_io           ios_base::sync_with_stdio(false);cin.tie(NULL)

const int MS=1000001;
const lli INF=1e9+7;

template<class T>
 bool comp(T a, T b){
  if(a.ss<b.ss)
    return true;
  return false;
 }
int main(){
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
   fast_io;
   int n;
   cin>>n;
   vi v(n),ch(n+1,0);
   for(int i=0; i<n; i++)
    cin>>v[i],ch[v[i]]++;
  bool ans=true;
  for(int i=1; i<=n; i++){
    if(ch[i]>1 || ch[i]==0)
      ans=false;
  }
  if(ans)
    cout<<"Yes";
  else cout<<"No";
      
   
}