import java.util.*;

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		int N = sc.nextInt();
		HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>();
		int A[] = new int[N];
		for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		}


		if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}

 import java.util.*; util.* java class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		int N = sc.nextInt();
		HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>();
		int A[] = new int[N];
		for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		}


		if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		int N = sc.nextInt();
		HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>();
		int A[] = new int[N];
		for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		}


		if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		int N = sc.nextInt();
		HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>();
		int A[] = new int[N];
		for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		}


		if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean flag = true; flag true int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>(); hash new HashMap<Integer, Integer>() int A[] = new int[N]; A new int[N] N for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		} {
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		} A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			} hash.get(A[i]) == null hash.get(A[i]) hash.get hash A[i] A i null {
				hash.put(A[i],A[i]);
			} hash.put(A[i],A[i]) hash.put hash A[i] A i A[i] A i {
				flag = false;
				break;
			} flag = false flag false break; if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		} flag {
			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
import java.util.*;

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		int N = sc.nextInt();
		HashMap<Integer,Integer> hash = new HashMap<Integer, Integer>();
		int A[] = new int[N];
		for(int i=0; i<N; i++){
			A[i] = sc.nextInt();
			if(hash.get(A[i]) == null){
				hash.put(A[i],A[i]);
			} else {
				flag = false;
				break;
			}
		}


		if(flag) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}


