import java.util.*;

import java.io.*;
 
public class Main{

    public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    }
 
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        }
        if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
        
        
	}
}  import java.util.*; util.* java import java.io.*; io.* java public class Main{

    public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    }
 
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        }
        if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
        
        
	}
} Main public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    } stringToInt {
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    } if(i == 'A') return a[0]; i == 'A' i 'A' return a[0]; a[0] a 0 if(i == 'B') return a[1]; i == 'B' i 'B' return a[1]; a[1] a 1 if(i == 'C') return a[2]; i == 'C' i 'C' return a[2]; a[2] a 2 return 0; 0 char i i int[] a a public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        }
        if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
        
        
	} main {
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

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

        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        } {
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        } if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            } map.get(A[i]) == null map.get(A[i]) map.get map A[i] A i null {
                 map.put(A[i], true);
            } map.put(A[i], true) map.put map A[i] A i true {
                result = true;
                break;
            } result = true result true break; if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        } result {
            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[] $ $ public class Main{

    public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    }
 
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        }
        if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
        
        
	}
} public class Main{

    public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    }
 
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

        }
        if(result){
            System.out.println("NO");
        }else{
            System.out.println("YES");
        }
        
        
	}
} Main
import java.util.*;

import java.io.*;
 
public class Main{

    public static int stringToInt(char i, int[] a){
        if(i == 'A') return a[0];
        if(i == 'B') return a[1];
        if(i == 'C') return a[2];
        return 0;
    }
 
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] A = new int[N];
        for(int i = 0; i < N; i++){
            A[i] = s.nextInt();
        }

        HashMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        boolean result = false;
        for(int i = 0; i < N; i++){
            if(map.get(A[i]) == null){
                 map.put(A[i], true);
            }else{
                result = true;
                break;
            }

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