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