import java.util.*;

class Main{
  
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    PriorityQueue pq=new PriorityQueue();
    int N=sc.nextInt();
    
    for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    }
    
    int count=0;
    
    Long s=(Long)(pq.poll());
    while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    }
  }
} import java.util.*; util.* java class Main{
  
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    PriorityQueue pq=new PriorityQueue();
    int N=sc.nextInt();
    
    for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    }
    
    int count=0;
    
    Long s=(Long)(pq.poll());
    while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    }
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    PriorityQueue pq=new PriorityQueue();
    int N=sc.nextInt();
    
    for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    }
    
    int count=0;
    
    Long s=(Long)(pq.poll());
    while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    }
  } main {
    Scanner sc=new Scanner(System.in);
    PriorityQueue pq=new PriorityQueue();
    int N=sc.nextInt();
    
    for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    }
    
    int count=0;
    
    Long s=(Long)(pq.poll());
    while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    }
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) PriorityQueue pq=new PriorityQueue(); pq new PriorityQueue() int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      pq.add(sc.nextLong());
    } {
      pq.add(sc.nextLong());
    } pq.add(sc.nextLong()) pq.add pq sc.nextLong() sc.nextLong sc int count=0; count 0 Long s=(Long)(pq.poll()); s (Long)(pq.poll()) pq.poll pq while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    } !pq.isEmpty() pq.isEmpty() pq.isEmpty pq {
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    } count++ count Long t=(Long)(pq.poll()); t (Long)(pq.poll()) pq.poll pq if(s.equals(t)){
        System.out.print("NO");
        break;
      } s.equals(t) s.equals s t {
        System.out.print("NO");
        break;
      } System.out.print("NO") System.out.print System.out System System.out "NO" break; if(pq.isEmpty()) System.out.print("YES"); pq.isEmpty() pq.isEmpty pq System.out.print("YES") System.out.print System.out System System.out "YES" s=t s t String[] args args
import java.util.*;

class Main{
  
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    PriorityQueue pq=new PriorityQueue();
    int N=sc.nextInt();
    
    for(int i=0;i<N;i++){
      pq.add(sc.nextLong());
    }
    
    int count=0;
    
    Long s=(Long)(pq.poll());
    while(!pq.isEmpty()){
      count++;
      Long t=(Long)(pq.poll());
      if(s.equals(t)){
        System.out.print("NO");
        break;
      }
      if(pq.isEmpty()) System.out.print("YES");
      s=t;
    }
  }
}