import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        Set<Integer> as = new HashSet<Integer>();
        String ans = "YES";
        for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        }
        if(a.length!=as.size()){
            ans = "NO";
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        Set<Integer> as = new HashSet<Integer>();
        String ans = "YES";
        for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        }
        if(a.length!=as.size()){
            ans = "NO";
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        Set<Integer> as = new HashSet<Integer>();
        String ans = "YES";
        for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        }
        if(a.length!=as.size()){
            ans = "NO";
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        Set<Integer> as = new HashSet<Integer>();
        String ans = "YES";
        for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        }
        if(a.length!=as.size()){
            ans = "NO";
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n Set<Integer> as = new HashSet<Integer>(); as new HashSet<Integer>() String ans = "YES"; ans "YES" for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        } int i = 0 ; int i = 0 ; i 0 i<a.length i a.length a a.length i++ i++ i {
            a[i] = sc.nextInt();
            as.add(a[i]);
        } {
            a[i] = sc.nextInt();
            as.add(a[i]);
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc as.add(a[i]) as.add as a[i] a i if(a.length!=as.size()){
            ans = "NO";
        } a.length!=as.size() a.length a a.length as.size() as.size as {
            ans = "NO";
        } ans = "NO" ans "NO" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        Set<Integer> as = new HashSet<Integer>();
        String ans = "YES";
        for(int i = 0 ;i<a.length;i++){
            a[i] = sc.nextInt();
            as.add(a[i]);
        }
        if(a.length!=as.size()){
            ans = "NO";
        }
        System.out.println(ans);
    }
}