#include<bits/stdc++.h>
using namespace std;
#define int long
signed main(){
  int n;
  cin>>n;
  vector<int> a(n);
  for(auto& i:a)cin>>i;
  sort(a.begin(),a.end());
  for(int i=1;i<n;++i)if(a[i]==a[i-1])return cout<<"NO",0;
  cout<<"YES";
}