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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
} 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 sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc ArrayList<Integer> lList = new ArrayList<>(); lList new ArrayList<>() for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		} int index = 1; int index = 1; index 1 index <= N index N index++ index++ index {
			int n = sc.nextInt();
			lList.add(n);
		} {
			int n = sc.nextInt();
			lList.add(n);
		} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc lList.add(n) lList.add lList n Collections.sort(lList) Collections.sort Collections lList for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		} int x = 0; int x = 0; x 0 x < (N - 1) x (N - 1) N 1 x++ x++ x {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		} {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		} if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			} lList.get(x).equals(lList.get(x + 1)) lList.get(x).equals lList.get(x) lList.get lList x lList.get(x + 1) lList.get lList x + 1 x 1 {
				System.out.println("NO");
				return;
			} System.out.println("NO") System.out.println System.out System System.out "NO" return; System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		ArrayList<Integer> lList = new ArrayList<>();

		for (int index = 1; index <= N; index++) {
			int n = sc.nextInt();
			lList.add(n);
		}

		Collections.sort(lList);

		for (int x = 0; x < (N - 1); x++) {
			if (lList.get(x).equals(lList.get(x + 1))) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
}