import java.util.Arrays;

public class Main {

	public static void main(String[] args) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	}
} import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	}
} Main public static void main(String[] args) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	} main {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int input = sc.nextInt();
			a[i] = input;
		} {
			int input = sc.nextInt();
			a[i] = input;
		} int input = sc.nextInt(); input sc.nextInt() sc.nextInt sc a[i] = input a[i] a i input Arrays.sort(a) Arrays.sort Arrays a for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		} {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		} if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			} i != n - 1 && (a[i] == a[i + 1]) i != n - 1 i n - 1 n 1 (a[i] == a[i + 1]) a[i] a i a[i + 1] a i + 1 i 1 {
				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) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	}
} public class Main {

	public static void main(String[] args) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	}
} Main
import java.util.Arrays;

public class Main {

	public static void main(String[] args) {

		java.util.Scanner sc = new java.util.Scanner(System.in);

		int n = sc.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			int input = sc.nextInt();
			a[i] = input;
		}

		Arrays.sort(a);

		for (int i = 0; i < n; i++) {
			if (i != n - 1 && (a[i] == a[i + 1])) {
				System.out.println("NO");
				return;
			}
		}

		System.out.println("YES");
	}
}
