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