import java.util.*;
import java.util.Map.Entry;
 
 
 class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
	 static List<ArrayList<Integer>>  list = new ArrayList<ArrayList<Integer>>();
    public static void main(String[] args) {
    
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] A = new long[N];
        
        long cnt=0;
        for(int i=0;i<N;i++) {
        	A[i]=sc.nextLong();
        }
        Arrays.sort(A);
        String ans="YES";
        for(int i=0;i<N-1;i++) {
        	if(A[i]==A[i+1]) {
        		ans="NO";;
        		break;
        	}
        }

        System.out.println(ans);        	
                		
    }
    
    
} import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
	 static List<ArrayList<Integer>>  list = new ArrayList<ArrayList<Integer>>();
    public static void main(String[] args) {
    
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] A = new long[N];
        
        long cnt=0;
        for(int i=0;i<N;i++) {
        	A[i]=sc.nextLong();
        }
        Arrays.sort(A);
        String ans="YES";
        for(int i=0;i<N-1;i++) {
        	if(A[i]==A[i+1]) {
        		ans="NO";;
        		break;
        	}
        }

        System.out.println(ans);        	
                		
    }
    
    
} Main static int mod =  (int) (Math.pow(10,9)+7); mod (int) (Math.pow(10,9)+7) Math.pow(10,9) Math.pow Math 10 9 7 static List<ArrayList<Integer>>  list = new ArrayList<ArrayList<Integer>>(); list new ArrayList<ArrayList<Integer>>() public static void main(String[] args) {
    
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] A = new long[N];
        
        long cnt=0;
        for(int i=0;i<N;i++) {
        	A[i]=sc.nextLong();
        }
        Arrays.sort(A);
        String ans="YES";
        for(int i=0;i<N-1;i++) {
        	if(A[i]==A[i+1]) {
        		ans="NO";;
        		break;
        	}
        }

        System.out.println(ans);        	
                		
    } main {
    
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] A = new long[N];
        
        long cnt=0;
        for(int i=0;i<N;i++) {
        	A[i]=sc.nextLong();
        }
        Arrays.sort(A);
        String ans="YES";
        for(int i=0;i<N-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) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long[] A = new long[N]; A new long[N] N long cnt=0; cnt 0 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 String ans="YES"; ans "YES" for(int i=0;i<N-1;i++) {
        	if(A[i]==A[i+1]) {
        		ans="NO";;
        		break;
        	}
        } int i=0; int i=0; i 0 i<N-1 i N-1 N 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.*;
import java.util.Map.Entry;
 
 
 class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
	 static List<ArrayList<Integer>>  list = new ArrayList<ArrayList<Integer>>();
    public static void main(String[] args) {
    
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] A = new long[N];
        
        long cnt=0;
        for(int i=0;i<N;i++) {
        	A[i]=sc.nextLong();
        }
        Arrays.sort(A);
        String ans="YES";
        for(int i=0;i<N-1;i++) {
        	if(A[i]==A[i+1]) {
        		ans="NO";;
        		break;
        	}
        }

        System.out.println(ans);        	
                		
    }
    
    
}