import java.util.HashSet;
import java.util.Scanner;

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

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    } try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        } {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                A[i] = sc.nextInt();
            } {
                A[i] = sc.nextInt();
            } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for (int i = 0; i < N; i++) {
                set.add(A[i]);
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                set.add(A[i]);
            } {
                set.add(A[i]);
            } set.add(A[i]) set.add set A[i] A i System.out.println(set.size() == N ? "YES" : "NO") System.out.println System.out System System.out set.size() == N ? "YES" : "NO" set.size() == N set.size() set.size set N "YES" "NO" String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int[] A = new int[N];
            for (int i = 0; i < N; i++) {
                A[i] = sc.nextInt();
            }

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    }
} Main
import java.util.HashSet;
import java.util.Scanner;

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

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

            System.out.println(set.size() == N ? "YES" : "NO");
        }
    }
}