import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		List<Long> list = new ArrayList();
		for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		}
		Collections.sort(list);
		long b = Long.MAX_VALUE;
		for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		}
		System.out.println("YES");
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		List<Long> list = new ArrayList();
		for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		}
		Collections.sort(list);
		long b = Long.MAX_VALUE;
		for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		}
		System.out.println("YES");
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		List<Long> list = new ArrayList();
		for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		}
		Collections.sort(list);
		long b = Long.MAX_VALUE;
		for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		}
		System.out.println("YES");
	} main {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		List<Long> list = new ArrayList();
		for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		}
		Collections.sort(list);
		long b = Long.MAX_VALUE;
		for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		}
		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 List<Long> list = new ArrayList(); list new ArrayList() for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			list.add(Long.parseLong(sc.next()));
		} {
			list.add(Long.parseLong(sc.next()));
		} list.add(Long.parseLong(sc.next())) list.add list Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc Collections.sort(list) Collections.sort Collections list long b = Long.MAX_VALUE; b Long.MAX_VALUE Long Long.MAX_VALUE for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		} Long a list {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		} {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		} if(a == b) {
				System.out.println("NO");
				return;
			} a == b a b {
				System.out.println("NO");
				return;
			} System.out.println("NO") System.out.println System.out System System.out "NO" return; b = a b a System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		List<Long> list = new ArrayList();
		for(int i=0; i<N ; i++) {
			list.add(Long.parseLong(sc.next()));
		}
		Collections.sort(list);
		long b = Long.MAX_VALUE;
		for(Long a : list) {
			if(a == b) {
				System.out.println("NO");
				return;
			}
			b = a;
		}
		System.out.println("YES");
	}
}
