import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	}
} Main public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	} main {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	} Scanner  sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] a = new int[n]; a new int[n] n Set<Integer> task = new HashSet<>(); task new HashSet<>() for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			a[i] = Integer.parseInt(sc.next());
		} {
			a[i] = Integer.parseInt(sc.next());
		} a[i] = Integer.parseInt(sc.next()) a[i] a i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		} {
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		} if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    } task.contains(a[i]) task.contains task a[i] a i {
		    	System.out.println("NO");
		    	return;
		    } System.out.println("NO") System.out.println System.out System System.out "NO" return; task.add(a[i]) task.add task a[i] a i 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(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	}
} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner  sc = new Scanner(System.in);
		// input
		int n = Integer.parseInt(sc.next());
		int[] a = new int[n];
		Set<Integer> task = new HashSet<>();
		for(int i=0; i<n; i++) {
			a[i] = Integer.parseInt(sc.next());
		}
		// 同じ構造でもArrayListだとTLEで死ぬ
		for (int i = 0; i < a.length; i++){
		    if(task.contains(a[i])) {
		    	System.out.println("NO");
		    	return;
		    }
		    task.add(a[i]);
		}
		System.out.println("YES");		
	}
}