import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc String ans = "NO"; ans "NO" Set<Long> set = new HashSet<>(); set new HashSet<>() for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		} long i = 0; long i = 0; i 0 i < N i N i++ i++ i {
			set.add(sc.nextLong());
		} {
			set.add(sc.nextLong());
		} set.add(sc.nextLong()) set.add set sc.nextLong() sc.nextLong sc if(N == set.size()){
			ans = "YES";
		} N == set.size() N set.size() set.size set {
			ans = "YES";
		} ans = "YES" ans "YES" System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String ans = "NO";
		Set<Long> set = new HashSet<>();
		for(long i = 0;i < N;i++){
			set.add(sc.nextLong());
		}
		if(N == set.size()){
			ans = "YES";
		}
		System.out.println(ans);
	}
}