import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int n = inp.nextInt();
        int a[] = new int[n];
        Set<Integer> sa = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        }
        String ans = (sa.size() == a.length ? "YES" : "NO");
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int n = inp.nextInt();
        int a[] = new int[n];
        Set<Integer> sa = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        }
        String ans = (sa.size() == a.length ? "YES" : "NO");
        System.out.println(ans);
    }
} Main public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int n = inp.nextInt();
        int a[] = new int[n];
        Set<Integer> sa = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        }
        String ans = (sa.size() == a.length ? "YES" : "NO");
        System.out.println(ans);
    } main {
        Scanner inp = new Scanner(System.in);
        int n = inp.nextInt();
        int a[] = new int[n];
        Set<Integer> sa = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        }
        String ans = (sa.size() == a.length ? "YES" : "NO");
        System.out.println(ans);
    } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) int n = inp.nextInt(); n inp.nextInt() inp.nextInt inp int a[] = new int[n]; a new int[n] n Set<Integer> sa = new HashSet<Integer>(); sa new HashSet<Integer>() for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        } {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        } a[i] = inp.nextInt() a[i] a i inp.nextInt() inp.nextInt inp sa.add(a[i]) sa.add sa a[i] a i String ans = (sa.size() == a.length ? "YES" : "NO"); ans (sa.size() == a.length ? "YES" : "NO") sa.size() == a.length sa.size() sa.size sa a.length a a.length "YES" "NO" System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        int n = inp.nextInt();
        int a[] = new int[n];
        Set<Integer> sa = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            a[i] = inp.nextInt();
            sa.add(a[i]);
        }
        String ans = (sa.size() == a.length ? "YES" : "NO");
        System.out.println(ans);
    }
}