import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    }
} Main public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        } int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        } {
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        } int t = scan.nextInt(); t scan.nextInt() scan.nextInt scan if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t); set.contains(t) set.contains set t {
                System.out.println("NO");
                return;
            } System.out.println("NO") System.out.println System.out System System.out "NO" return; set.add(t) set.add set t System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < n; i ++){
            int t = scan.nextInt();
            if (set.contains(t)){
                System.out.println("NO");
                return;
            }else
                set.add(t);
        }
        System.out.println("YES");
    }
}
