import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

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

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {

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

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } main {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Map<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        } {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if (!map.containsKey(a)) map.put(a, 0); !map.containsKey(a) map.containsKey(a) map.containsKey map a map.put(a, 0) map.put map a 0 map.put(a, map.get(a) + 1) map.put map a map.get(a) + 1 map.get(a) map.get map a 1 for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        } int value map.values() map.values map {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        } {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        } if (value > 1) {
                System.out.println("NO");
                return;
            } value > 1 value 1 {
                System.out.println("NO");
                return;
            } System.out.println("NO") System.out.println System.out System System.out "NO" return; 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) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} public class Main {

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

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

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

        final int N = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < N; i++) {
            int a = sc.nextInt();
            if (!map.containsKey(a)) map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }

        for (int value: map.values()) {
            if (value > 1) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
}
