#include<bits/stdc++.h>
using namespace std;
int i,j,n,m,c,d,a,b,e;
int s[210000];
int main(){
  for(cin>>n;i<n;i++)cin>>s[i];
  sort(s,s+i);
  for(j=0;j<n-1;j++)if(s[j]==s[j+1])return cout<<"NO",0;
  cout<<"YES",0;
}