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

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++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set 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++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	}
} 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++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		Set<Integer> set = new HashSet<>();
		for (int i = 0; i < N; i++) {

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

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		} {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		} int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc if(set.contains(A)) {
				System.out.println("NO");
				return;
			} set.contains(A) set.contains set A {
				System.out.println("NO");
				return;
			} System.out.println("NO") System.out.println System.out System System.out "NO" return; set.add(A) set.add set A 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();

		Set<Integer> set = new HashSet<>();
		for (int i = 0; i < N; i++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	}
} 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++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

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++) {

			int A = sc.nextInt();
			if(set.contains(A)) {
				System.out.println("NO");
				return;
			}
			set.add(A);
		}
		System.out.println("YES");
	}
}