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

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	}

} 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 scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	} main {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan Set<Integer> a = new HashSet<Integer>(); a new HashSet<Integer>() for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		} {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		} int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			} !a.contains(x) a.contains(x) a.contains a x {
				a.add(x);				
			} a.add(x) a.add a x {
				System.out.println("NO");
				return;
			} System.out.println("NO") System.out.println System.out System System.out "NO" return; System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	}

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

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		Set<Integer> a = new HashSet<Integer>();
		
		for (int i = 0; i < n; i++) {
			int x = scan.nextInt();
			if (!a.contains(x)) {
				a.add(x);				
			} else {
				System.out.println("NO");
				return;
			}
		}
		
		System.out.println("YES");

	}

}