import java.io.*; 
import java.lang.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
class Main{
public static void main(String[] args){
try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){}
}
} import java.io.*; io.* java import java.lang.*; lang.* java import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java class Main{
public static void main(String[] args){
try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){}
}
} Main public static void main(String[] args){
try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){}
} main {
try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){}
} try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){} catch(Exception e){} Exception e {} {
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String b = reader.readLine(); b reader.readLine() reader.readLine reader String c = reader.readLine(); c reader.readLine() reader.readLine reader String parts[] = c.split(" "); parts c.split(" ") c.split c " " int n = Integer.parseInt(b); n Integer.parseInt(b) Integer.parseInt Integer b Arrays.sort(parts) Arrays.sort Arrays parts int flag = 0; flag 0 for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  } int i =0; int i =0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  } {
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  } if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    } parts[i].compareTo(parts[i+1]) == 0 parts[i].compareTo(parts[i+1]) parts[i].compareTo parts[i] parts i parts[i+1] parts i+1 i 1 0 {
      flag =1;
      System.out.println("NO");
      i = n;
    } flag =1 flag 1 System.out.println("NO") System.out.println System.out System System.out "NO" i = n i n if(flag == 0){
    System.out.println("YES");
  } flag == 0 flag 0 {
    System.out.println("YES");
  } System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args
import java.io.*; 
import java.lang.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
class Main{
public static void main(String[] args){
try{
   BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String b = reader.readLine();
   String c = reader.readLine();
  String parts[] = c.split(" ");
 	int n = Integer.parseInt(b);
  Arrays.sort(parts);
   int flag = 0;
  for(int i =0;i<n-1;i++){
  	if(parts[i].compareTo(parts[i+1]) == 0){
      flag =1;
      System.out.println("NO");
      i = n;
    }
  }
  
 
  
  if(flag == 0){
    System.out.println("YES");
  }
}catch(Exception e){}
}
}