import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            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 List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() int num; num for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        } {
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        } num = sc.nextInt() num sc.nextInt() sc.nextInt sc list.add(num) list.add list num set.add(num) set.add set num int a = list.size(); a list.size() list.size list int b = set.size(); b set.size() set.size set if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        } a==b a b {
            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) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        List<Integer> list = new ArrayList<Integer>();
        Set<Integer> set = new HashSet<Integer>();
        
        int num;
        for(int i=0;i<N;i++){
            num = sc.nextInt();
            list.add(num);
            set.add(num);
        }
        int a = list.size();
        int b = set.size();
        
        if(a==b){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
