import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] A = new int[N]; A new int[N] N StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken()); int i=0; int i=0; i 0 i<N i N i++ i++ i A[i] = Integer.parseInt(st.nextToken()); A[i] = Integer.parseInt(st.nextToken()) A[i] A i Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st Arrays.sort(A) Arrays.sort Arrays A String ans = "YES"; ans "YES" for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		} {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		} if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			} A[i] == A[i-1] A[i] A i A[i-1] A i-1 i 1 {
				ans = "NO";
				break;
			} ans = "NO" ans "NO" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());
		int[] A = new int[N];
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		for(int i=0; i<N; i++)
			A[i] = Integer.parseInt(st.nextToken());
		Arrays.sort(A);
		String ans = "YES";
		
		for(int i=1; i<N; i++) {
			if(A[i] == A[i-1]) {
				ans = "NO";
				break;
			}
		}
		
		System.out.println(ans);
	}

}