import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    }


    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    }


    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    }
} Main static MyReader in = new MyReader(); in new MyReader() public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    } main {
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    } int N = in.i(); N in.i() in.i in int[] A = in.ii(N); A in.ii(N) in.ii in N Arrays.sort(A) Arrays.sort Arrays A int a = A[0]; a A[0] A 0 String ans = "YES"; ans "YES" for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        } int i = 1; int i = 1; i 1 i < A.length i A.length A A.length i++ i++ i {
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        } {
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        } if (A[i] == a) {
                ans = "NO";
                break;
            } A[i] == a A[i] A i a {
                ans = "NO";
                break;
            } ans = "NO" ans "NO" break; a = A[i] a A[i] A i out.println(ans) out.println out ans String[] args args static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    } MyReader MyReader(){
            super(new InputStreamReader(System.in));
        } MyReader {
            super(new InputStreamReader(System.in));
        } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) String s(){
            try{return readLine();}catch(IOException e){return "";}
        } s {
            try{return readLine();}catch(IOException e){return "";}
        } try{return readLine();}catch(IOException e){return "";} catch(IOException e){return "";} IOException e {return "";} return ""; "" {return readLine();} return readLine(); readLine() readLine int i() {
            return Integer.parseInt(s());
        } i {
            return Integer.parseInt(s());
        } return Integer.parseInt(s()); Integer.parseInt(s()) Integer.parseInt Integer s() s int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        } ii {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        } int[] a = new int[N]; a new int[N] N int i = 0; i 0 String s = s(); s s() s for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            } int j = 0; int j = 0; j 0 j < a.length j a.length a a.length j++ j++ j {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            } {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            } boolean minus = s.charAt(i) == '-'; minus s.charAt(i) == '-' s.charAt(i) s.charAt s i '-' i += minus ? 1 : 0 i minus ? 1 : 0 minus 1 0 int k = 0; k 0 while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                } true {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                } try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; } catch (Exception e) { break; } Exception e { break; } break; {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } int h = s.charAt(i++) - '0'; h s.charAt(i++) - '0' s.charAt(i++) s.charAt s i++ i '0' if (h < 0 || 9 < h) break; h < 0 || 9 < h h < 0 h 0 9 < h 9 h break; k = 10 * k + h k 10 * k + h 10 * k 10 k h a[j] = minus ? -k : k a[j] a j minus ? -k : k minus -k k k return a; a final int N N BufferedReader public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    }


    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    }
} public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    }


    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    }
} Main
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int N = in.i();
        int[] A = in.ii(N);
        Arrays.sort(A);
        int a = A[0];
        String ans = "YES";
        for(int i = 1; i < A.length; i++){
            if (A[i] == a) {
                ans = "NO";
                break;
            }
            a = A[i];
        }
        out.println(ans);
    }


    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }

        int i() {
            return Integer.parseInt(s());
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            int i = 0;
            String s = s();
            for (int j = 0; j < a.length; j++) {
                boolean minus = s.charAt(i) == '-';
                i += minus ? 1 : 0;
                int k = 0;
                while (true) {
                    try {
                        int h = s.charAt(i++) - '0';
                        if (h < 0 || 9 < h) break;
                        k = 10 * k + h;
                    } catch (Exception e) { break; }
                }
                a[j] = minus ? -k : k;
            }
            return a;
        }
    }
}
