#include<stdio.h>
#include<algorithm>
using namespace std;
int a[200000];
int main()
{
	int i,n,flag=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	  scanf("%d",&a[i]);
	}
	sort(a,a+n);
	for(i=0;i<n-1;i++)
	{
	   if(a[i]==a[i+1])
	   {
	      flag=1;
	      break;
	   }
	}
	if(flag==1)
	{
		printf("NO\n");
	}
	else
	{
		printf("YES\n");
	}
	return 0;	
 } 
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {

	ll n; cin >> n;
	map<ll, ll> mp;
	for (int i = 0; i < n; i++) {
		ll a; cin >> a;
		mp[a]++;
	}
	ll cnt = 0;
	for (auto u : mp) {
		if (1 < u.second) cnt++;
	}
	string ans = "YES";
	if (1 <= cnt) ans = "NO";
	cout << ans << endl;
    return 0;
}