import java.util.Arrays;
import java.util.Scanner;
public class Main {

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

	
}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

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

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

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

	
} Scanner input= new Scanner(System.in); input new Scanner(System.in) int loop = input.nextInt(); loop input.nextInt() input.nextInt input int  arr [] = new int [loop]; arr new int [loop] loop int i=0; i 0 String x ="YES"; x "YES" while(i<loop) {
			arr[i]=input.nextInt();
			i++;
			
		} i<loop i loop {
			arr[i]=input.nextInt();
			i++;
			
		} arr[i]=input.nextInt() arr[i] arr i input.nextInt() input.nextInt input i++ i Arrays.sort(arr) Arrays.sort Arrays arr i=0 i 0 while (i<loop-1) {
			if (arr[i] == arr[i+1]) {
				x="NO";
				break;
			
			}
			i++;
			
			
		} i<loop-1 i loop-1 loop 1 {
			if (arr[i] == arr[i+1]) {
				x="NO";
				break;
			
			}
			i++;
			
			
		} if (arr[i] == arr[i+1]) {
				x="NO";
				break;
			
			} arr[i] == arr[i+1] arr[i] arr i arr[i+1] arr i+1 i 1 {
				x="NO";
				break;
			
			} x="NO" x "NO" break; i++ i System.out.println(x) System.out.println System.out System System.out x String[] args args public class Main {

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

	
}
} public class Main {

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

	
}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {

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

	
}
}