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