import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) abc154_c solver = new abc154_c(); solver new abc154_c() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    } abc154_c public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        } solve {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int A[] = new int[N]; A new int[N] N for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                int idx = in.nextInt();
                A[i] = idx;
            } {
                int idx = in.nextInt();
                A[i] = idx;
            } int idx = in.nextInt(); idx in.nextInt() in.nextInt in A[i] = idx A[i] A i idx Arrays.sort(A) Arrays.sort Arrays A for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            } {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            } if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                } A[i] == A[i + 1] A[i] A i A[i + 1] A i + 1 i 1 {
                    out.println("NO");
                    return;
                } out.println("NO") out.println out "NO" return; out.println("YES") out.println out "YES" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc154_c solver = new abc154_c();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc154_c {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                int idx = in.nextInt();
                A[i] = idx;
            }
            Arrays.sort(A);
            for (int i = 0; i < N - 1; i++) {
                if (A[i] == A[i + 1]) {
                    out.println("NO");
                    return;
                }
            }
            out.println("YES");
        }

    }
}

