import java.util.*;
 
class Main{
  public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    String ans = "YES";
    Set<Integer> A = new HashSet<>();
    for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    }
    if(A.size() != N){
      ans = "NO";
    }    
    System.out.println(ans);
    }
}
    
     import java.util.*; util.* java class Main{
  public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    String ans = "YES";
    Set<Integer> A = new HashSet<>();
    for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    }
    if(A.size() != N){
      ans = "NO";
    }    
    System.out.println(ans);
    }
} Main public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    String ans = "YES";
    Set<Integer> A = new HashSet<>();
    for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    }
    if(A.size() != N){
      ans = "NO";
    }    
    System.out.println(ans);
    } main {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    String ans = "YES";
    Set<Integer> A = new HashSet<>();
    for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    }
    if(A.size() != N){
      ans = "NO";
    }    
    System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc String ans = "YES"; ans "YES" Set<Integer> A = new HashSet<>(); A new HashSet<>() for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      A.add(sc.nextInt());
    } {
      A.add(sc.nextInt());
    } A.add(sc.nextInt()) A.add A sc.nextInt() sc.nextInt sc if(A.size() != N){
      ans = "NO";
    } A.size() != N A.size() A.size A N {
      ans = "NO";
    } ans = "NO" ans "NO" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
 
class Main{
  public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    String ans = "YES";
    Set<Integer> A = new HashSet<>();
    for(int i = 0; i < N; i++){
      A.add(sc.nextInt());
    }
    if(A.size() != N){
      ans = "NO";
    }    
    System.out.println(ans);
    }
}
    
    