import java.util.*;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	} main {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("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] arr i sc.nextInt() sc.nextInt sc Arrays.sort(arr) Arrays.sort Arrays arr Boolean flag = true; flag true for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		} int i = 0; int i = 0; i 0 i < n-1 && flag i < n-1 i n-1 n 1 flag i++ i++ i {
			if (arr[i] == arr[i+1])
				flag = false;
		} {
			if (arr[i] == arr[i+1])
				flag = false;
		} if (arr[i] == arr[i+1])
				flag = false; arr[i] == arr[i+1] arr[i] arr i arr[i+1] arr i+1 i 1 flag = false flag false if (flag)
			System.out.print("YES");
		else
			System.out.print("NO"); flag System.out.print("YES") System.out.print System.out System System.out "YES" System.out.print("NO") System.out.print System.out System System.out "NO" String[] args args public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	}
} public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		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);
		Boolean flag = true;
		for (int i = 0; i < n-1 && flag; i++) {
			if (arr[i] == arr[i+1])
				flag = false;
		}			
		if (flag)
			System.out.print("YES");
		else
			System.out.print("NO");
	}
}