import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  }
} Main public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  } main {
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    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 long A[] =new long[N]; A new long[N] N for(int i=0;i<N;i++){
      A[i]=sc.nextLong();} int i=0; int i=0; i 0 i<N i N i++ i++ i {
      A[i]=sc.nextLong();} {
      A[i]=sc.nextLong();} A[i]=sc.nextLong() A[i] A i sc.nextLong() sc.nextLong sc Arrays.sort(A) Arrays.sort Arrays A for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}} int j=1; int j=1; j 1 j<N j N j++ j++ j {
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}} {
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}} if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);} A[j]==A[j-1] A[j] A j A[j-1] A j-1 j 1 {System.out.println("NO");System.exit(0);} System.out.println("NO") System.out.println System.out System System.out "NO" System.exit(0) System.exit System 0 System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    long A[] =new long[N];
    for(int i=0;i<N;i++){
      A[i]=sc.nextLong();}
    Arrays.sort(A);
    for(int j=1;j<N;j++){
      if(A[j]==A[j-1]){System.out.println("NO");System.exit(0);}}
    System.out.println("YES");
  }
}