
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());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}

} 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());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	} 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 Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		} {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		} int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc set.add(a) set.add set a if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		} set.size() == n set.size() set.size set n {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}

} 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());

		Set<Integer> set = new HashSet<Integer>();
		for(int i = 0 ;i < n ;i++) {
			int a = Integer.parseInt(sc.next());
			set.add(a);
		}
		
		if(set.size() == n) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}

}
