import java.util.HashSet;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)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);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc HashSet<Integer> list = new HashSet<Integer>(); list new HashSet<Integer>() list.add(0) list.add list 0 for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		} {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		} int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			} !list.contains(l) list.contains(l) list.contains list l {
				list.add(l);
			} list.add(l) list.add list l {
				break;
			} break; if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO"); list.size() == N+1 list.size() list.size list N+1 N 1 System.out.println("YES") System.out.println System.out System System.out "YES" 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);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)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);
		int N = sc.nextInt();
		HashSet<Integer> list = new HashSet<Integer>();
		list.add(0);
		for(int i = 0; i < N; i++) {
			int l = sc.nextInt();
			if(!list.contains(l)) {
				list.add(l);
			}else{
				break;
			}
		}
		if(list.size() == N+1)System.out.println("YES");
		else System.out.println("NO");
	}
}