import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            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 {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.nextLine() sc.nextLine sc List<String> list = Arrays.asList(sc.nextLine().split(" ")); list Arrays.asList(sc.nextLine().split(" ")) Arrays.asList Arrays sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " Set<String> set = new HashSet<>(list); set new HashSet<>(list) if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        } list.size() == set.size() list.size() list.size list set.size() set.size set {
            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 {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        
        List<String> list = Arrays.asList(sc.nextLine().split(" "));
        Set<String> set = new HashSet<>(list);
        if(list.size() == set.size()){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
}