import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	}

} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	}

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	} main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc int num = Integer.parseInt(line); num Integer.parseInt(line) Integer.parseInt Integer line String[] elementStr = sc.nextLine().split(" "); elementStr sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " HashSet<Integer>elem = new HashSet<Integer>(); elem new HashSet<Integer>() for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
    	elem.add(Integer.parseInt(elementStr[i]));
    } {
    	elem.add(Integer.parseInt(elementStr[i]));
    } elem.add(Integer.parseInt(elementStr[i])) elem.add elem Integer.parseInt(elementStr[i]) Integer.parseInt Integer elementStr[i] elementStr i if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        } elem.size() == elementStr.length elem.size() elem.size elem elementStr.length elementStr elementStr.length {
        	System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" {
        	System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {

	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	}

} public class Main {

	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	}

} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        int num = Integer.parseInt(line);
        String[] elementStr = sc.nextLine().split(" ");

        HashSet<Integer>elem = new HashSet<Integer>();
      for(int i = 0; i < num ;i++) {
    	elem.add(Integer.parseInt(elementStr[i]));
    }



        if(elem.size() == elementStr.length) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }

	}

}
