import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    }
} Main public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    } main {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan int arr[]=new int[n]; arr new int[n] n for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        } int i = 0; int i = 0; i 0 i <n i n i++ i++ i {
            arr[i]=scan.nextInt();
        } {
            arr[i]=scan.nextInt();
        } arr[i]=scan.nextInt() arr[i] arr i scan.nextInt() scan.nextInt scan Arrays.sort(arr) Arrays.sort Arrays arr for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        } int i = 1; int i = 1; i 1 i <n i n i++ i++ i {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        } {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        } if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            } arr[i]==arr[i-1] arr[i] arr i arr[i-1] arr i-1 i 1 {
                System.out.print("NO");
                return;
            } System.out.print("NO") System.out.print System.out System System.out "NO" return; System.out.print("YES") System.out.print System.out System System.out "YES" String[] args args public class Main {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    }
} public class Main {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int arr[]=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=scan.nextInt();
        }
        Arrays.sort(arr);
        for (int i = 1; i <n ; i++) {
            if (arr[i]==arr[i-1]){
                System.out.print("NO");
                return;
            }
        }
        System.out.print("YES");
    }
}
