import java.util.*;

public class Main {
    // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    }




} import java.util.*; util.* java public class Main {
    // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    }




} Main // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner scanner.nextLine() scanner.nextLine scanner List<Integer> values = new ArrayList<>(); values new ArrayList<>() for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        } int x = 0; int x = 0; x 0 x<N x N x++ x++ x {
            values.add(scanner.nextInt());
        } {
            values.add(scanner.nextInt());
        } values.add(scanner.nextInt()) values.add values scanner.nextInt() scanner.nextInt scanner String returnVal = "YES"; returnVal "YES" Collections.sort(values) Collections.sort Collections values for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        } int x=1; int x=1; x 1 x<=N-1 x N-1 N 1 x++ x++ x {

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        } {

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        } if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            } values.get(x-1).equals(values.get(x)) values.get(x-1).equals values.get(x-1) values.get values x-1 x 1 values.get(x) values.get values x {
                returnVal = "NO";
                break;
            } returnVal = "NO" returnVal "NO" break; System.out.println(returnVal) System.out.println System.out System System.out returnVal String[] args args public class Main {
    // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    }




} public class Main {
    // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    }




} Main
import java.util.*;

public class Main {
    // AtCoder Beginner Contest 154
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        List<Integer> values = new ArrayList<>();
        for(int x = 0; x<N; x++){
            values.add(scanner.nextInt());
        }
        String returnVal = "YES";
        Collections.sort(values);
        for(int x=1; x<=N-1; x++){

            if(values.get(x-1).equals(values.get(x))){
                returnVal = "NO";
                break;
            }
        }

        System.out.println(returnVal);

    }




}
