import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    } main {
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) HashMap<Integer,Integer> hash = new HashMap<>(); hash new HashMap<>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        } {
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        } int j = sc.nextInt(); j sc.nextInt() sc.nextInt sc if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1); hash.containsKey(j) hash.containsKey hash j hash.put(j,2) hash.put hash j 2 hash.put(j,1) hash.put hash j 1 boolean b = true; b true for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        } int a hash.values() hash.values hash {
            if (a > 1) {
                b = false;
                break;
            }
        } {
            if (a > 1) {
                b = false;
                break;
            }
        } if (a > 1) {
                b = false;
                break;
            } a > 1 a 1 {
                b = false;
                break;
            } b = false b false break; if (b)System.out.println("YES");
        else System.out.println("NO"); b System.out.println("YES") System.out.println System.out System System.out "YES" 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){
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        HashMap<Integer,Integer> hash = new HashMap<>();
        int n = sc.nextInt();
        for (int i=0;i<n;i++){
            int j = sc.nextInt();
            if (hash.containsKey(j))hash.put(j,2);
            else hash.put(j,1);
        }
        boolean b = true;
        for (int a : hash.values()){
            if (a > 1) {
                b = false;
                break;
            }
        }
        if (b)System.out.println("YES");
        else System.out.println("NO");
    }
} Main
import java.util.*;

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