import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        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 int list[] = new int[N]; list new int[N] N for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int value = sc.nextInt();
            list[i] = value;
        } {
            int value = sc.nextInt();
            list[i] = value;
        } int value = sc.nextInt(); value sc.nextInt() sc.nextInt sc list[i] = value list[i] list i value Arrays.sort(list) Arrays.sort Arrays list for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        } {
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        } if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } i != N-1 && list[i] == list[i+1] i != N-1 i N-1 N 1 list[i] == list[i+1] list[i] list i list[i+1] list i+1 i 1 {
                System.out.println("NO");
                return;
            } System.out.println("NO") System.out.println System.out System System.out "NO" return; 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) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int list[] = new int[N];
            
        for (int i = 0; i < N; i++){
            int value = sc.nextInt();
            list[i] = value;
        }
        
        Arrays.sort(list);
        
        for (int i = 0; i < N; i++){
            if (i != N-1 && list[i] == list[i+1]){
                System.out.println("NO");
                return;
            } 
        }
        
        System.out.println("YES");
    }
}
