import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> a = new ArrayList<>(); a new ArrayList<>() while (sc.hasNext()){
      a.add(sc.nextInt());
    } sc.hasNext() sc.hasNext sc {
      a.add(sc.nextInt());
    } a.add(sc.nextInt()) a.add a sc.nextInt() sc.nextInt sc boolean ans = (a.size() == new HashSet<>(a).size()); ans (a.size() == new HashSet<>(a).size()) a.size() a.size a new HashSet<>(a).size() new HashSet<>(a).size new HashSet<>(a) if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    } ans {
      System.out.println("YES");
    } System.out.println("YES") System.out.println System.out System System.out "YES" {
      System.out.println("NO");
    } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    List<Integer> a = new ArrayList<>();
    while (sc.hasNext()){
      a.add(sc.nextInt());
    }
    
    boolean ans = (a.size() == new HashSet<>(a).size());
    
    if(ans){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }

    
    
  }
}