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

vector<ll>v;

int main()
{
	ll n, i, ans, x;

	cin>>n;

	for(i=1; i<=n; i++)
	{
		cin>>x;
		v.push_back(x);
	}
	sort(v.begin(),v.end());
	v.resize(unique(v.begin(),v.end())-v.begin());
	if(v.size()==n)cout<<"YES"<<endl;
	else{
		cout<<"NO"<<endl;
	}
}