import java.util.Scanner;
import java.util.Arrays;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int array[]=new int[n];
        for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        }

        Arrays.sort(array);

        for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        }
        sc.close();
    }
}	 import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int array[]=new int[n];
        for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        }

        Arrays.sort(array);

        for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        }
        sc.close();
    }
} Main public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int array[]=new int[n];
        for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        }

        Arrays.sort(array);

        for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        }
        sc.close();
    } main {
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int array[]=new int[n];
        for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        }

        Arrays.sort(array);

        for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        }
        sc.close();
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int array[]=new int[n]; array new int[n] n for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            array[i]=sc.nextInt();
        } {
            array[i]=sc.nextInt();
        } array[i]=sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc Arrays.sort(array) Arrays.sort Arrays array for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        } int j=0; int j=0; j 0 j<n-1 j n-1 n 1 j++ j++ j {
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        } {
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        } if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            } array[j]-array[j+1]==0 array[j]-array[j+1] array[j] array j array[j+1] array j+1 j 1 0 {
                System.out.println("NO");
                break;
            } System.out.println("NO") System.out.println System.out System System.out "NO" break; if(j==n-2){
                System.out.println("YES");
            } j==n-2 j n-2 n 2 {
                System.out.println("YES");
            } System.out.println("YES") System.out.println System.out System System.out "YES" sc.close() sc.close sc String args[] args
import java.util.Scanner;
import java.util.Arrays;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int array[]=new int[n];
        for(int i=0; i<n; i++){
            array[i]=sc.nextInt();
        }

        Arrays.sort(array);

        for(int j=0; j<n-1; j++){
            if(array[j]-array[j+1]==0){
                System.out.println("NO");
                break;
            }
            if(j==n-2){
                System.out.println("YES");
            }    
        }
        sc.close();
    }
}	