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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] a = new int[n]; a new int[n] n for(int i = 0; i < n; i++){
			a[i] = scanner.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = scanner.nextInt();
		} {
			a[i] = scanner.nextInt();
		} a[i] = scanner.nextInt() a[i] a i scanner.nextInt() scanner.nextInt scanner Arrays.sort(a) Arrays.sort Arrays a String result = "YES"; result "YES" for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		} int i = 0; int i = 0; i 0 i<a.length-1 i a.length-1 a.length a a.length 1 i++ i++ i {
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		} {
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		} if(a[i] == a[i+1]){
				result = "NO";
				break;
			} a[i] == a[i+1] a[i] a i a[i+1] a i+1 i 1 {
				result = "NO";
				break;
			} result = "NO" result "NO" break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	}

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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();

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


		Arrays.sort(a);
		String result = "YES";
		for(int i = 0; i<a.length-1; i++){
			if(a[i] == a[i+1]){
				result = "NO";
				break;
			}
		}

		System.out.println(result);
	}

}
