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[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		System.out.println(res);


	}

} 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[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		System.out.println(res);


	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		System.out.println(res);


	} main {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		System.out.println(res);


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


	}

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


	}

} 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[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		System.out.println(res);


	}

}
