import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	}

} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s  = "YES"; s "YES" Set<Integer> a = new HashSet<>(); a new HashSet<>() for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		} {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			} a.contains(num) a.contains a num {
				s = "NO";
				break;
			} s = "NO" s "NO" break; {
				a.add(num);
			} a.add(num) a.add a num sc.close() sc.close sc System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	}

} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		String s  = "YES";
		Set<Integer> a = new HashSet<>();
		for(int i=0; i<N; i++) {
			int num = sc.nextInt();
			if(a.contains(num)){
				s = "NO";
				break;
			} else {
				a.add(num);
			}
		}
		sc.close();
		System.out.println(s);
	}

}