import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		}
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

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

		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		}
	} main {

		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		}
	} try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		} {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashSet<Integer> list = new HashSet<>(); list new HashSet<>() for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			} {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			} if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				} !list.add(sc.nextInt()) list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc {
					System.out.println("NO");
					return;
				} System.out.println("NO") System.out.println System.out System System.out "NO" return; 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) {

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

		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			HashSet<Integer> list = new HashSet<>();
			for (int i = 0; i < n; i++) {
				if (!list.add(sc.nextInt())) {
					System.out.println("NO");
					return;
				}
			}
			System.out.println("YES");
		}
	}
}
