#include<bits/stdc++.h>
using namespace std;

int main()
{
  int n,t;
  cin>>n;
  t=n;
  set<int> s;
  while(t--)
  {
    int x;
    cin>>x;
    s.insert(x);
  }
  if(s.size()==n) cout<<"YES";
  else cout<<"NO";
 return 0; 
}