import java.io.BufferedInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

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

    }
} Main public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

    } main {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

    } Scanner sc=new Scanner(new BufferedInputStream(System.in)); sc new Scanner(new BufferedInputStream(System.in)) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int m[]=new int[a]; m new int[a] a for(int i=0;i<a;i++)
            m[i]=sc.nextInt(); int i=0; int i=0; i 0 i<a i a i++ i++ i m[i]=sc.nextInt(); m[i]=sc.nextInt() m[i] m i sc.nextInt() sc.nextInt sc Arrays.sort(m) Arrays.sort Arrays m int flag=0; flag 0 for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        } int i=1; int i=1; i 1 i<a i a i++ i++ i {
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        } {
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        } if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            } m[i]==m[i-1] m[i] m i m[i-1] m i-1 i 1 {
                System.out.println("NO");
                flag++;
                break;
            } System.out.println("NO") System.out.println System.out System System.out "NO" flag++ flag break; if(flag==0)
            System.out.println("YES"); flag==0 flag 0 System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

    }
} Main
import java.io.BufferedInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        int a=sc.nextInt();
        int m[]=new int[a];
        for(int i=0;i<a;i++)
            m[i]=sc.nextInt();
        Arrays.sort(m);
        int flag=0;
        for(int i=1;i<a;i++){
            if(m[i]==m[i-1]){
                System.out.println("NO");
                flag++;
                break;
            }
        }
        if(flag==0)
            System.out.println("YES");

    }
}
