import java.util.*;


class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();

        Set<Integer> s = new HashSet<>();

        for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        }
        System.out.println("YES");
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();

        Set<Integer> s = new HashSet<>();

        for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        }
        System.out.println("YES");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();

        Set<Integer> s = new HashSet<>();

        for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        }
        System.out.println("YES");
    } main {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();

        Set<Integer> s = new HashSet<>();

        for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        }
        System.out.println("YES");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Map<String, Integer> dic = new TreeMap<>(); dic new TreeMap<>() int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc Set<Integer> s = new HashSet<>(); s new HashSet<>() for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        } {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        } int tmp = sc.nextInt(); tmp sc.nextInt() sc.nextInt sc if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            } s.contains(tmp) s.contains s tmp {
                System.out.println("NO");
                System.exit(0);
            } System.out.println("NO") System.out.println System.out System System.out "NO" System.exit(0) System.exit System 0 {
                s.add(tmp);
            } s.add(tmp) s.add s tmp System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args
import java.util.*;


class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        Map<String, Integer> dic = new TreeMap<>();
        int N = sc.nextInt();
        sc.nextLine();

        Set<Integer> s = new HashSet<>();

        for (int i = 0; i < N; i++) {
            int tmp = sc.nextInt();
            if (s.contains(tmp)) {
                System.out.println("NO");
                System.exit(0);
            } else {
                s.add(tmp);
            }
        }
        System.out.println("YES");
    }
}
