import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}

	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.TreeSet; TreeSet java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			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();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}

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

		int N = sc.nextInt();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			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 List<Long> list = new ArrayList<>(); list new ArrayList<>() List<Long> anser = new ArrayList<>(); anser new ArrayList<>() for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list.add(sc.nextLong());
		} {
			list.add(sc.nextLong());
		} list.add(sc.nextLong()) list.add list sc.nextLong() sc.nextLong sc TreeSet<Long> TS = new TreeSet<>(list); TS new TreeSet<>(list) if(list.size() == TS.size()) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		} list.size() == TS.size() list.size() list.size list TS.size() TS.size TS {
			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);

		int N = sc.nextInt();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			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();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}

	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		//Long[] anser = new Long[N];
		List<Long> list = new ArrayList<>();
		List<Long> anser = new ArrayList<>();
		for(int i = 0; i < N ; i++) {
			list.add(sc.nextLong());
		}

		//重複しているものを追加しない、自動ソート済み
		TreeSet<Long> TS = new TreeSet<>(list);
		if(list.size() == TS.size()) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}

	}
}