import java.util.*;

public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] Az = new int[N]; Az new int[N] N for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            Az[i] = sc.nextInt();
        } {
            Az[i] = sc.nextInt();
        } Az[i] = sc.nextInt() Az[i] Az 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(Az[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            set.add(Az[i]);
        } {
            set.add(Az[i]);
        } set.add(Az[i]) set.add set Az[i] Az i if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        } set.size() == N set.size() set.size set N {
            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 sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} public class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] Az = new int[N];
        for (int i = 0; i < N; i++) {
            Az[i] = sc.nextInt();
        }
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < N; i++) {
            set.add(Az[i]);
        }
        if (set.size() == N){
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
} Main
import java.util.*;

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