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