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<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			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();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
    } main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			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 HashSet<Integer> A = new HashSet<Integer>(); A new HashSet<Integer>() for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			A.add(sc.nextInt());
		} {
			A.add(sc.nextInt());
		} A.add(sc.nextInt()) A.add A sc.nextInt() sc.nextInt sc if(A.size()<N){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		} A.size()<N A.size() A.size A N {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" {
			System.out.println("YES");
		} 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();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
    }
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			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();
		HashSet<Integer> A = new HashSet<Integer>();

		for(int i=0; i<N; i++){
			A.add(sc.nextInt());
		}
		
		if(A.size()<N){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
    }
}
