#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define rep(i, n) for(int i = 0; i < n; i++)

int main(){
    int N;
    cin >> N;
    map<int, int> mp;
    bool is = true;
    rep(i, N){
        int a;
        cin >> a;
        if(mp.count(a) != 0){
            is = false;
            break;
        }else{
            mp[a]++;
        }
    }
    if(is) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}
#include <bits/stdc++.h>
#include <cstdlib>
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
using ll = long long;

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  string ans="YES";
  map<int, int> hoge;
  
  rep(i,N) {
    cin >> A[i];
    if(hoge[A[i]] == 1) ans="NO";
    else hoge[A[i]] = 1;
  }
  
  cout << ans << endl;
   
  return 0;
}