import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next(); sc.nextLine();
    String Ast = sc.nextLine();
    String As[] = Ast.split(" ",0);
    int A[] = new int[As.length];
    for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    }
    Arrays.sort(A);
    String ans = "YES";
    for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next(); sc.nextLine();
    String Ast = sc.nextLine();
    String As[] = Ast.split(" ",0);
    int A[] = new int[As.length];
    for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    }
    Arrays.sort(A);
    String ans = "YES";
    for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String N = sc.next(); sc.nextLine();
    String Ast = sc.nextLine();
    String As[] = Ast.split(" ",0);
    int A[] = new int[As.length];
    for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    }
    Arrays.sort(A);
    String ans = "YES";
    for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String N = sc.next(); sc.nextLine();
    String Ast = sc.nextLine();
    String As[] = Ast.split(" ",0);
    int A[] = new int[As.length];
    for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    }
    Arrays.sort(A);
    String ans = "YES";
    for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N = sc.next(); N sc.next() sc.next sc sc.nextLine() sc.nextLine sc String Ast = sc.nextLine(); Ast sc.nextLine() sc.nextLine sc String As[] = Ast.split(" ",0); As Ast.split(" ",0) Ast.split Ast " " 0 int A[] = new int[As.length]; A new int[As.length] As.length As As.length for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    } int i=0; int i=0; i 0 i<As.length i As.length As As.length i++ i++ i {
       A[i] = Integer.parseInt(As[i]);
    } {
       A[i] = Integer.parseInt(As[i]);
    } A[i] = Integer.parseInt(As[i]) A[i] A i Integer.parseInt(As[i]) Integer.parseInt Integer As[i] As i Arrays.sort(A) Arrays.sort Arrays A String ans = "YES"; ans "YES" for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    } int i=0; int i=0; i 0 i<A.length-1 i A.length-1 A.length A A.length 1 i++ i++ i {
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    } {
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    } if (A[i] == A[i+1]){
        ans = "NO";
        break;
      } A[i] == A[i+1] A[i] A i A[i+1] A i+1 i 1 {
        ans = "NO";
        break;
      } ans = "NO" ans "NO" break; 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);
    String N = sc.next(); sc.nextLine();
    String Ast = sc.nextLine();
    String As[] = Ast.split(" ",0);
    int A[] = new int[As.length];
    for (int i=0;i<As.length;i++){
       A[i] = Integer.parseInt(As[i]);
    }
    Arrays.sort(A);
    String ans = "YES";
    for (int i=0;i<A.length-1;i++){
      if (A[i] == A[i+1]){
        ans = "NO";
        break;
      }
    }
    System.out.println(ans);
  }
}