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

int main()
{
	cin>>n;
	map<ll,ll>m;
	int f=0;
	for(int i=1;i<=n;i++){
		cin>>a;
		m[a]++;
		if(m[a]>=2) f=1;
	}
	if(f==1) cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
		
}