import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

class Main {
    
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        Collections.sort(list);
        for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
    
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util class Main {
    
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        Collections.sort(list);
        for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
    
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        Collections.sort(list);
        for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        Collections.sort(list);
        for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner List<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            list.add(scanner.nextInt());
        } {
            list.add(scanner.nextInt());
        } list.add(scanner.nextInt()) list.add list scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner Collections.sort(list) Collections.sort Collections list for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        } int i=0; int i=0; i 0 i<list.size()-1 i list.size()-1 list.size() list.size list 1 i++ i++ i {
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        } {
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        } if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            } list.get(i).compareTo(list.get(i+1))==0 list.get(i).compareTo(list.get(i+1)) list.get(i).compareTo list.get(i) list.get list i list.get(i+1) list.get list i+1 i 1 0 {
                System.out.println("NO");
                return;
            } System.out.println("NO") System.out.println System.out System System.out "NO" return; System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

class Main {
    
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        Collections.sort(list);
        for(int i=0; i<list.size()-1; i++){
            if(list.get(i).compareTo(list.get(i+1))==0){
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
    
}