#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <queue>
#include <math.h>
#include <assert.h>
#include <set>
#include <map>
#include <bitset>
#include <ctime>
#include <time.h>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <stack>
#include <ctype.h>
#include <numeric>
#include <sstream>
#include <unistd.h>
#include <unordered_map>
#include <unordered_set>
#include <limits>
#include <random>
#include <chrono>
#include <iomanip>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
using ll = long long;
#define endl '\n'
#define debug(name) DEBUG(#name, (name))
template<typename T>
void DEBUG(string label, T value) {
    cerr << "[" << label << " = " << value << "]\n";
}

void solve(){
    int n;
    cin >> n;
    vector<int> arr(n);
    for(int i = 0; i < n; ++i){
        cin >> arr[i];
    }
    sort(arr.begin(),arr.end());
    arr.resize(unique(arr.begin(), arr.end()) - arr.begin());
    cout << ((int)arr.size() == n ? "YES" : "NO") << endl;
}

int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int t = 1;
    while(t--){
        solve();
    }
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

int main() {
	ll n;
	cin>>n;
	map<ll,ll>ch;
	for(ll i=0;i<n;i++){
		ll x;
		cin>>x;
		ch[x]++;
		if(ch[x]==2){
			cout << "NO";
			return 0;
		}
	}
	cout << "YES";
	// your code goes here
	return 0;
}