import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int n = sc.nextInt();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) System.out.println("YES");
      	else System.out.println("NO");
        
	}
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int n = sc.nextInt();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) 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();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) System.out.println("YES");
      	else System.out.println("NO");
        
	} main {
		Scanner sc = new Scanner(System.in);
  		
      	int n = sc.nextInt();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) 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 long as[] = new long[n]; as new long[n] n int stack; stack boolean neq = true; neq true for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	as[i] = sc.nextInt(); 
        } {
        	as[i] = sc.nextInt(); 
        } as[i] = sc.nextInt() as[i] as i sc.nextInt() sc.nextInt sc Arrays.sort(as) Arrays.sort Arrays as for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } int i = 0; int i = 0; i 0 i < n-1 && neq i < n-1 i n-1 n 1 neq i++ i++ i {
        	if(as[i] == as[i+1]) neq = false; 
        } {
        	if(as[i] == as[i+1]) neq = false; 
        } if(as[i] == as[i+1]) neq = false; as[i] == as[i+1] as[i] as i as[i+1] as i+1 i 1 neq = false neq false if(neq) System.out.println("YES");
      	else System.out.println("NO"); neq System.out.println("YES") System.out.println System.out System System.out "YES" 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();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) 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();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) System.out.println("YES");
      	else System.out.println("NO");
        
	}
} Main
import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
  		
      	int n = sc.nextInt();
      	long as[] = new long[n];
      	int stack;
		boolean neq = true;
      
      	for(int i = 0;i < n;i++){
        	as[i] = sc.nextInt(); 
        } 
      	Arrays.sort(as);
      	for(int i = 0;i < n-1 && neq;i++){
        	if(as[i] == as[i+1]) neq = false; 
        } 
       	
      	if(neq) System.out.println("YES");
      	else System.out.println("NO");
        
	}
}
