import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    }
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    }
} Main public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    } main {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<Integer, Boolean> map = new HashMap<>(); map new HashMap<>() for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	} {
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	} int a  = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		} null != map.get(a) null map.get(a) map.get map a {
    			System.out.println("NO");
    			sc.close();
    			return;
    		} System.out.println("NO") System.out.println System.out System System.out "NO" sc.close() sc.close sc return; {
    			map.put(a, true);;
    		} map.put(a, true) map.put map a true sc.close() sc.close sc 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) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    }
} public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    }
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	Map<Integer, Boolean> map = new HashMap<>();
    	for(int i = 0; i < n; i++){
    		int a  = sc.nextInt();
    		if(null != map.get(a)){
    			System.out.println("NO");
    			sc.close();
    			return;
    		}else{
    			map.put(a, true);;
    		}
    	}
    	sc.close();
    	System.out.println("YES");
    }
}