import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			System.out.println("YES");
		}
		else
			System.out.println("NO");

		
		
		
}
} import java.util.Arrays; Arrays 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();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			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();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			System.out.println("YES");
		}
		else
			System.out.println("NO");

		
		
		
} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			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 int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = sc.nextInt();
		} {
			arr[i] = sc.nextInt();
		} arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc Arrays.sort(arr) Arrays.sort Arrays arr int flag =0; flag 0 for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		} int k =0; int k =0; k 0 k< n-1 k n-1 n 1 {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		} {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		} if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			} arr[k+1]!=arr[k] arr[k+1] arr k+1 k 1 arr[k] arr k {
				k++;
			} k++ k {
				flag =1;
				break;
				
			} flag =1 flag 1 break; if (flag==0){
			System.out.println("YES");
		}
		else
			System.out.println("NO"); flag==0 flag 0 {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" 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();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			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();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			System.out.println("YES");
		}
		else
			System.out.println("NO");

		
		
		
}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		int flag =0;
		for (int k =0; k< n-1;) {
			if (arr[k+1]!=arr[k]) {
				k++;
			}
			else {
				flag =1;
				break;
				
			}
		}
		if (flag==0){
			System.out.println("YES");
		}
		else
			System.out.println("NO");

		
		
		
}
}