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

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

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