import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    } main {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int size = scanner.nextInt(); size scanner.nextInt() scanner.nextInt scanner Set<Integer> first = new HashSet<>(); first new HashSet<>() first.add(scanner.nextInt()) first.add first scanner.nextInt() scanner.nextInt scanner String answer = "YES"; answer "YES" for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        } int i = 1; int i = 1; i 1 i < size i size i ++ i ++ i {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        } {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        } int new1 = scanner.nextInt(); new1 scanner.nextInt() scanner.nextInt scanner if (first.contains(new1)) {
                answer = "NO";
                break;
            } first.contains(new1) first.contains first new1 {
                answer = "NO";
                break;
            } answer = "NO" answer "NO" break; first.add(new1) first.add first new1 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        Set<Integer> first = new HashSet<>();
        first.add(scanner.nextInt());
        String answer = "YES";
        for (int i = 1; i < size; i ++) {
            int new1 = scanner.nextInt();
            if (first.contains(new1)) {
                answer = "NO";
                break;
            }
            first.add(new1);
        }
        System.out.println(answer);
    }
}