import java.util.HashMap;
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	}
 
} import java.util.HashMap; HashMap 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();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	}
 
} Main public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	} main {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan String anser = "YES"; anser "YES" HashMap<Integer, Integer> map = new HashMap<Integer, Integer>(); map new HashMap<Integer, Integer>() int A = 0; A 0 for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		} {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		} A = scan.nextInt() A scan.nextInt() scan.nextInt scan if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			} map.containsKey(A) map.containsKey map A {
				anser = "NO";
				break;
			} anser = "NO" anser "NO" break; {
				map.put(A, i);
			} map.put(A, i) map.put map A i System.out.println(anser) System.out.println System.out System System.out anser String[] args args public class Main {
	public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	}
 
} public class Main {
	public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	}
 
} Main
import java.util.HashMap;
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		int A = 0;
		for (int i = 0; i < N; i++) {
			A = scan.nextInt();
 
			if (map.containsKey(A)) {
				anser = "NO";
				break;
			} else {
				map.put(A, i);
			}
		}
 
		System.out.println(anser);
	}
 
}