import java.math.*;
import java.util.*;

	public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		}

	} import java.math.*; math.* java import java.util.*; util.* java public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==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 = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		} main {

			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<Integer> Aset = new HashSet<Integer>(); Aset new HashSet<Integer>() for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				Aset.add(sc.nextInt());
			} {
				Aset.add(sc.nextInt());
			} Aset.add(sc.nextInt()) Aset.add Aset sc.nextInt() sc.nextInt sc int L = Aset.size(); L Aset.size() Aset.size Aset if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			} L==N L 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 = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==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 = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		}

	} Main
import java.math.*;
import java.util.*;

	public class Main {

		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			int N = sc.nextInt();
			Set<Integer> Aset = new HashSet<Integer>();
			
			for(int i=0;i<N;i++) {
				Aset.add(sc.nextInt());
			}
			
			int L = Aset.size();
			
			if(L==N) {
				System.out.println("YES");
			}
			else {
				System.out.println("NO");
			}
		}

	}