import java.util.*;


public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  } main {
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		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 f=0; f 0 long[] a=new long[n]; a new long[n] n for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      a[i]=sc.nextLong();
    } {
      a[i]=sc.nextLong();
    } a[i]=sc.nextLong() a[i] a i sc.nextLong() sc.nextLong sc Arrays.sort(a) Arrays.sort Arrays a for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	} {
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	} if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		} a[i]==a[i+1] a[i] a i a[i+1] a i+1 i 1 {
  			System.out.println("NO");
  			f++;
  			break;
  		} System.out.println("NO") System.out.println System.out System System.out "NO" f++ f break; if(f==0){
  		System.out.println("YES");
  	} f==0 f 0 {
  		System.out.println("YES");
  	} 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(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  }
} Main
import java.util.*;


public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int n=sc.nextInt(),f=0;
    long[] a=new long[n];
    
  	
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
  	Arrays.sort(a);
  	for(int i=0;i<n-1;i++){
  		if(a[i]==a[i+1]){
  			System.out.println("NO");
  			f++;
  			break;
  		}
  	}
  	if(f==0){
  		System.out.println("YES");
  	}
  }
}
