import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	}

} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	} main {
		Scanner sc=new Scanner(System.in);
		int i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int i=sc.nextInt(); i sc.nextInt() sc.nextInt sc int[] arr=new int[i]; arr new int[i] i for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		} int x=0; int x=0; x 0 x<arr.length x arr.length arr arr.length x++ x++ x {
			arr[x]=sc.nextInt();
		} {
			arr[x]=sc.nextInt();
		} arr[x]=sc.nextInt() arr[x] arr x sc.nextInt() sc.nextInt sc boolean f=true; f true Arrays.sort(arr) Arrays.sort Arrays arr for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		} int x=0; int x=0; x 0 x<arr.length-1 x arr.length-1 arr.length arr arr.length 1 x++ x++ x {
			if (arr[x]==arr[x+1])
				f =false;
		} {
			if (arr[x]==arr[x+1])
				f =false;
		} if (arr[x]==arr[x+1])
				f =false; arr[x]==arr[x+1] arr[x] arr x arr[x+1] arr x+1 x 1 f =false f false if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO"); f==true f true 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 i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			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 i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i=sc.nextInt();
		int[] arr=new int[i];
		for(int x=0;x<arr.length;x++) {
			arr[x]=sc.nextInt();
		}
		boolean f=true;
		Arrays.sort(arr);
		for(int x=0;x<arr.length-1;x++) {
			if (arr[x]==arr[x+1])
				f =false;
		}
		if (f==true)
			System.out.println("YES");
		else 
			System.out.println("NO");
		
	}

}
