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

public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	}
} Main public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	} main {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb String k = "YES"; k "YES" ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int j = kb.nextInt();
			a.add(j);
		} {
			int j = kb.nextInt();
			a.add(j);
		} int j = kb.nextInt(); j kb.nextInt() kb.nextInt kb a.add(j) a.add a j Collections.sort(a) Collections.sort Collections a for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		} int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		} {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		} if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			} a.get(i).equals(a.get(i + 1)) a.get(i).equals a.get(i) a.get a i a.get(i + 1) a.get a i + 1 i 1 {
				k = "NO";
				break;
			} k = "NO" k "NO" break; System.out.println(k) System.out.println System.out System System.out k kb.close() kb.close kb String[] args args public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		String k = "YES";
		ArrayList<Integer> a = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			int j = kb.nextInt();
			a.add(j);
		}
		Collections.sort(a);
		//System.out.println(a.get(0));
		//System.out.println(a.get(1));
		for (int i = 0; i < n - 1; i++) {
			//System.out.println(i);
			//System.out.println(a.get(i).equals(a.get(i + 1)));
			if (a.get(i).equals(a.get(i + 1))) {
				k = "NO";
				break;
			}
		}
		System.out.println(k);
		kb.close();
	}
}
