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