import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

} import java.io.*; io.* java import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

} Main public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    } main {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner boolean flag=true; flag true int[] arr = new int[N]; arr new int[N] N for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        } int i=0; int i=0; i 0 i <N i N i++ i++ i {
            arr[i]=scanner.nextInt();
        } {
            arr[i]=scanner.nextInt();
        } arr[i]=scanner.nextInt() arr[i] arr i scanner.nextInt() scanner.nextInt scanner Arrays.sort(arr) Arrays.sort Arrays arr for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        } int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        } {
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        } if (arr[i]==arr[i+1]){
                flag=false;
                break;
            } arr[i]==arr[i+1] arr[i] arr i arr[i+1] arr i+1 i 1 {
                flag=false;
                break;
            } flag=false flag false break; if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        } flag {
            pw.println("YES");
        } pw.println("YES") pw.println pw "YES" {
            pw.println("NO");
        } pw.println("NO") pw.println pw "NO" pw.close() pw.close pw String[] args args static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    } Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        } Scanner {
            br = new BufferedReader(new InputStreamReader(s));
        } br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        } Scanner {
            br = new BufferedReader(new FileReader(file));
        } br = new BufferedReader(new FileReader(file)) br new BufferedReader(new FileReader(file)) String file file public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {
            return br.readLine();
        } nextLine {
            return br.readLine();
        } return br.readLine(); br.readLine() br.readLine br public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public boolean ready() throws IOException {
            return br.ready();
        } ready {
            return br.ready();
        } return br.ready(); br.ready() br.ready br public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

} public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

} Main
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int N = scanner.nextInt();
        boolean flag=true;
        int[] arr = new int[N];
        for (int i=0; i <N;i++){
            arr[i]=scanner.nextInt();
        }
        Arrays.sort(arr);
        for(int i=0;i<N-1;i++){
            if (arr[i]==arr[i+1]){
                flag=false;
                break;
            }
        }
        if(flag){
            pw.println("YES");
        }else{
            pw.println("NO");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }

}