import java.util.*;
public class Main{

     public static void main(String []args){
        
        
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        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 N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     }
} Main public static void main(String []args){
        
        
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     } main {
        
        
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     } 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 String[] splt = scanner.nextLine().split(" "); splt scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " List<String> list = new ArrayList<>(); list new ArrayList<>() for(String sp: splt){
            list.add(sp);
        } String sp splt {
            list.add(sp);
        } {
            list.add(sp);
        } list.add(sp) list.add list sp Collections.sort(list) Collections.sort Collections list String answer = "YES"; answer "YES" for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        } int x = 0; int x = 0; x 0 x<N-1 x N-1 N 1 x++ x++ x {
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        } {
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        } if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            } list.get(x).equals(list.get(x+1)) list.get(x).equals list.get(x) list.get list x list.get(x+1) list.get list x+1 x 1 {
                answer = "NO";
                break;
            } answer = "NO" answer "NO" break; 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 N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     }
} public class Main{

     public static void main(String []args){
        
        
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     }
} Main
import java.util.*;
public class Main{

     public static void main(String []args){
        
        
        
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        scanner.nextLine();
        String[] splt = scanner.nextLine().split(" ");
        List<String> list = new ArrayList<>();
        for(String sp: splt){
            list.add(sp);
        }
        Collections.sort(list);
        String answer = "YES";
        for(int x = 0; x<N-1; x++){
            if(list.get(x).equals(list.get(x+1))){
                answer = "NO";
                break;
            }
        }
        System.out.println(answer);
        
        
        
     }
}