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

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = scan.nextInt();
		} {
			a[i] = scan.nextInt();
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan String ans = "YES"; ans "YES" Arrays.sort(a) Arrays.sort Arrays a for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		} 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]) ans = "NO";
		} {
			if (a[i] == a[i + 1]) ans = "NO";
		} if (a[i] == a[i + 1]) ans = "NO"; a[i] == a[i + 1] a[i] a i a[i + 1] a i + 1 i 1 ans = "NO" ans "NO" System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		String ans = "YES";

		Arrays.sort(a);

		for (int i = 0; i < n - 1; i++) {
			if (a[i] == a[i + 1]) ans = "NO";
		}

		System.out.println(ans);

		scan.close();
	}
}
