import java.io.PrintWriter;
import java.util.*;

public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    final long mod = 1000000000+7;
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    }
    // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    }
}
 import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    final long mod = 1000000000+7;
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    }
    // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    }
} Main static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final long mod = 1000000000+7; mod 1000000000+7 1000000000 7 public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    } main {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    } Main main = new Main(); main new Main() main.solve() main.solve main out.flush() out.flush out String[] args args // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    } solve {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(n/2+1); set new HashSet<>(n/2+1) for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            set.add(sc.nextInt());
        } {
            set.add(sc.nextInt());
        } set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc if(set.size()==n) out.println("YES");
        else out.println("NO"); set.size()==n set.size() set.size set n out.println("YES") out.println out "YES" out.println("NO") out.println out "NO" public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    final long mod = 1000000000+7;
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    }
    // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    }
} public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    final long mod = 1000000000+7;
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    }
    // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    }
} Main
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static PrintWriter out = new PrintWriter(System.out);
    final long mod = 1000000000+7;
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
        out.flush();
//        System.out.println(main.solve());
    }
    // segment tree to record minimum value
    // Each point has a infinite distance from 0 (except itself)
    void solve() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>(n/2+1);
        for(int i=0;i<n;i++){
            set.add(sc.nextInt());
        }
        if(set.size()==n) out.println("YES");
        else out.println("NO");
    }
}

