import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<Integer,Integer> m = new HashMap<Integer,Integer>(); m new HashMap<Integer,Integer>() boolean b = true; b true for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        } {
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            } m.containsKey(a) m.containsKey m a {
                b = false;
                break;
            } b = false b false break; {
                m.put(a, a);
            } m.put(a, a) m.put m a a System.out.println(b ? "YES":"NO") System.out.println System.out System System.out b ? "YES":"NO" b "YES" "NO" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        Map<Integer,Integer> m = new HashMap<Integer,Integer>();

        boolean b = true;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(m.containsKey(a)){
                b = false;
                break;
            }else{
                m.put(a, a);
            }
        }
        System.out.println(b ? "YES":"NO");

    }
}
