import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		execute7_2();
	}
	
	

	private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	}
} import java.util.ArrayDeque; ArrayDeque java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	public static void main(String[] args) {
		execute7_2();
	}
	
	

	private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	}
} Main public static void main(String[] args) {
		execute7_2();
	} main {
		execute7_2();
	} execute7_2() execute7_2 String[] args args private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	} execute7_2 {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	} try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		} {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Long s[] = new Long[N]; s new Long[N] N for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				s[i]=sc.nextLong();
			} {
				s[i]=sc.nextLong();
			} s[i]=sc.nextLong() s[i] s i sc.nextLong() sc.nextLong sc Arrays.sort(s, Comparator.reverseOrder()) Arrays.sort Arrays s Comparator.reverseOrder() Comparator.reverseOrder Comparator boolean d=false; d false for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			} {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			} if(s[i-1].equals(s[i])) {
					d=true;
					break;
				} s[i-1].equals(s[i]) s[i-1].equals s[i-1] s i-1 i 1 s[i] s i {
					d=true;
					break;
				} d=true d true break; if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			} d {
				System.out.println("NO");
			} System.out.println("NO") System.out.println System.out System System.out "NO" {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" public class Main {

	public static void main(String[] args) {
		execute7_2();
	}
	
	

	private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	}
} public class Main {

	public static void main(String[] args) {
		execute7_2();
	}
	
	

	private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	}
} Main
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		execute7_2();
	}
	
	

	private static void execute7_2() {
		try (Scanner sc = new Scanner(System.in)) {
			int N = sc.nextInt();

			Long s[] = new Long[N];

			for (int i = 0; i < N; i++) {
				s[i]=sc.nextLong();
			}
			
			Arrays.sort(s, Comparator.reverseOrder());
			

			boolean d=false;
			for (int i = 1; i < N; i++) {
				if(s[i-1].equals(s[i])) {
					d=true;
					break;
				}
			}
			
			if(d) {
				System.out.println("NO");
			} else {
				System.out.println("YES");
			}
			
		}
	}
}