import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } main {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A[i] = stdIn.nextInt();
        } {
            A[i] = stdIn.nextInt();
        } A[i] = stdIn.nextInt() A[i] A i stdIn.nextInt() stdIn.nextInt stdIn stdIn.close() stdIn.close stdIn Set<Integer> H = new HashSet<>(); H new HashSet<>() for (int i = 0; i < N; i++) {
            H.add(A[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            H.add(A[i]);
        } {
            H.add(A[i]);
        } H.add(A[i]) H.add H A[i] A i if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        } H.size() == A.length H.size() H.size H A.length A A.length {
            System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" {
            System.out.println("NO");
        } 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 stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();
        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = stdIn.nextInt();
        }
        stdIn.close();

        Set<Integer> H = new HashSet<>();
        for (int i = 0; i < N; i++) {
            H.add(A[i]);
        }

        if (H.size() == A.length) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}