#include <iostream>
#include <cmath>
#include <iomanip>
#include <utility>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

#define ll long long
         
using namespace std;
     
long long gcd(int x, int y){
     if ( x == 0 ) return y;
     
     return gcd(y%x, x);
}
     
long long lcm(int x, int y){
     if ( y == 0 ){
          return x;
     }
     
     return x*y/gcd(x, y);
}
     
int min(int a, int b){
     return a > b ? b : a;
}
     
int max(int a, int b){
     return a > b ? a : b;
}

int main()
{
     cin.sync_with_stdio( false );

     int n;
     cin>>n;

     int a[n];
     map <int, int> m;
     for (int i=0;i<n;i++){
          cin>>a[i];
          m[a[i]]++;
     }

     for (int i=0;i<n;i++){
          if ( m[a[i]] >= 2 ){
               cout<<"NO"<<endl;
               return 0;
          }
     }

     cout<<"YES"<<endl;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
const int maxn = 1e9 + 5;
#define INF 1000000000
const int MOD = 1e9+7;
const double PI = 3.14159265358979323846264338;



int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	fastio
    int n;
    cin >> n;
    ll a[n];
    set<ll> s;
    for(int i=0; i<n; i++){
    	cin >> a[i];
    	s.insert(a[i]);
    }
    if(s.size() == n){
    	cout << "YES\n";
    }else{
    	cout << "NO\n";
    }
    return 0;
}

