import java.util.Scanner;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	}
} Main public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	} main {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = input.nextInt();
		} {
			a[i] = input.nextInt();
		} a[i] = input.nextInt() a[i] a i input.nextInt() input.nextInt input Arrays.sort(a) Arrays.sort Arrays a boolean t = true; t true for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		} {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		} if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			} a[i] == a[i + 1] a[i] a i a[i + 1] a i + 1 i 1 {
				System.out.print("NO");
				t = false;
				break;
			} System.out.print("NO") System.out.print System.out System System.out "NO" t = false t false break; if (t) {
			System.out.print("YES");
		} t {
			System.out.print("YES");
		} System.out.print("YES") System.out.print System.out System System.out "YES" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	}
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = input.nextInt();
		}
		Arrays.sort(a);
		boolean t = true;
		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) {
				System.out.print("NO");
				t = false;
				break;
			}
		}

		if (t) {
			System.out.print("YES");
		}

	}
}