import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      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();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      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();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  } main {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      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 Integer a[]=new Integer[n]; a new Integer[n] n for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      a[i]=sc.nextInt();
    } {
      a[i]=sc.nextInt();
    } a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc Set s=new HashSet(); s new HashSet() for(int i=0;i<n;i++){
      s.add(a[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      s.add(a[i]);
    } {
      s.add(a[i]);
    } s.add(a[i]) s.add s a[i] a i if(s.size()==n){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    } s.size()==n s.size() s.size s n {
      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();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      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();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      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();
    Integer a[]=new Integer[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextInt();
    }
    Set s=new HashSet();
    for(int i=0;i<n;i++){
      s.add(a[i]);
    }
    if(s.size()==n){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}