#include <bits/stdc++.h>

using namespace std;

int a[200005];

int main() {
    int n;
    scanf("%d", &n);

    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);

    bool ok = 1;

    for (int i = 1; i < n; i++) {
        if (a[i] == a[i - 1]) ok = 0;
    }

    if (ok) printf("YES\n");
    else printf("NO\n");
}

/*
h s, d't skp th si tll i's sved
 * ABC141 E
 * ABC145 D
 * ABC147 F
*/
#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int main()
{
int n,x;
cin>>n;
set<int> st;
string ans="YES";
while(n--)
{
cin>>x;
if(st.count(x))
{
ans="NO";
break;
}
st.insert(x);
}
cout<<ans;
}