#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep1(i, c, n) for (ll i = c; i < (n); ++i)
//以下debug用
#define d(x) cout << #x << "; " << x << endl;
#define p(x) cout << x << endl;
#define f(x) for (long unsigned int i = 0; i < x.size(); i++) cout << #x << "[" << i << "]; " << x[i] << endl;

bool ok = false;

vector<pair<ll,ll>> p;
const int inf = 1001001001;
const ll INF = 1LL << 60; //無限大

ll ans=0,num=0,counter=0;
string s;

int main(){
  int N;
  cin >> N;
  vector<ll> v(N);
  rep(i,N) cin >> v[i];
  set<int> b;
  for (int i = 0; i < N; ++i) b.insert(v[i]);
  if (b.size() == N){
    p("Yes")
  }else{
    p("No")
  }




  return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = int64_t; using Vll =vector<ll>; using VVll =vector<vector<ll>>; 
template <class T> using Vec = vector<T>; template <class T> using VVec = vector<vector<T>>;
#define INF 9223372036854775807LL/2
void Z(ll i=-1){ if(i==-1)cout<<"Test"<<endl; else cout<<"Test"<<i<<endl; }
template <class T> void VVcout(VVec<T> A){ for(auto Vi:A) { for(auto i:Vi)cout<<i<<' '; cout<<endl;}}
template <class T> void Vcout(Vec<T> A){ for(auto i:A) cout<<i<<' '; cout<<endl;}
template <class T> void chmax(T &x,T y){if(x<y) x=y;} template <class T> void chmin(T &x,T y){if(x==-1 || x>y) x=y;}
#define rep(i,n) for(ll i=0;i<n;i++)  
#define reps(si, i,n) for(ll i=si;i<n;i++) 

int main(){
    ll n,a;
    cin>>n;
    Vll B(n,0);
    rep(i,n){
        cin>>a;
        B.at(a-1)++;
        
    }

    bool ans=true;

    rep(i,n) if(B.at(i)!=1) ans=false;

    if(ans) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    
    
}