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

public class Main {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	}
} import java.io.IOException; IOException java.io 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[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	}
} Main public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(); set new HashSet<>() for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			set.add(sc.nextInt());
		} {
			set.add(sc.nextInt());
		} set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		} set.size() != n set.size() set.size set n {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" {
			System.out.println("YES");
		} 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[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	}
} public class Main {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	}
} Main
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for(int i = 0; i < n; i++){
			set.add(sc.nextInt());
		}
		if(set.size() != n) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");
		}
	}
}
