import java.util.*;

public class Main {
    public static void main(String[] args) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} Main public static void main(String[] args) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } main {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } int N; N int[] Ai = null; Ai null try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        } {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc Ai = new int[N] Ai new int[N] N for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                Ai[i] = sc.nextInt();
            } {
                Ai[i] = sc.nextInt();
            } Ai[i] = sc.nextInt() Ai[i] Ai i sc.nextInt() sc.nextInt sc Set<Integer> set = new TreeSet<>(); set new TreeSet<>() for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        } int i Ai {
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        } {
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        } if(!set.add(i)){
                System.out.println("NO");
                return;
            } !set.add(i) set.add(i) set.add set i {
                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) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} public class Main {
    public static void main(String[] args) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        int N;
        int[] Ai = null;
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            Ai = new int[N];
            for (int i = 0; i < N; i++) {
                Ai[i] = sc.nextInt();
            }
        }

        Set<Integer> set = new TreeSet<>();
        for(int i : Ai){
            if(!set.add(i)){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
}
