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

public class Main {
	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	}

} import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	}

} Main public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	} main {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String strLine = sc.nextLine(); strLine sc.nextLine() sc.nextLine sc String[] strArr = strLine.split(" "); strArr strLine.split(" ") strLine.split strLine " " String re = "YES"; re "YES" List l = Arrays.asList(strArr); l Arrays.asList(strArr) Arrays.asList Arrays strArr Collections.sort(l) Collections.sort Collections l for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		} int i = 0; int i = 0; i 0 i < l.size() - 1 i l.size() - 1 l.size() l.size l 1 i++ i++ i {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		} {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		} if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			} l.get(i).equals(l.get(i + 1)) l.get(i).equals l.get(i) l.get l i l.get(i + 1) l.get l i + 1 i 1 {
				re = "NO";
				break;
			} re = "NO" re "NO" break; System.out.println(re) System.out.println System.out System System.out re String[] args args public class Main {
	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	}

} public class Main {
	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	}

} Main
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// 自分の得意な言語で
		// Let's チャレンジ！！

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		String strLine = sc.nextLine();
		String[] strArr = strLine.split(" ");

		String re = "YES";
		List l = Arrays.asList(strArr);
		Collections.sort(l);

		for (int i = 0; i < l.size() - 1; i++) {
			if (l.get(i).equals(l.get(i + 1))) {
				re = "NO";
				break;
			}
		}

		System.out.println(re);

	}

}