import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  }      
  static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  }
} import java.util.Scanner; Scanner java.util import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  }      
  static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  } main {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] A = new String[n]; A new String[n] n for(int i=0;i<n;i++){
        A[i]=sc.next();
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        A[i]=sc.next();
      } {
        A[i]=sc.next();
      } A[i]=sc.next() A[i] A i sc.next() sc.next sc int after=check(A); after check(A) check A if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      } n==after n after {
        System.out.println("YES");
      } System.out.println("YES") System.out.println System.out System System.out "YES" {
        System.out.println("NO");
      } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  } check {
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  } Set<String> LinkedHashSet = new LinkedHashSet<String>(); LinkedHashSet new LinkedHashSet<String>() for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      } int i=0; int i=0; i 0 i<A.length i A.length A A.length i++ i++ i {
        LinkedHashSet.add(A[i]);
      } {
        LinkedHashSet.add(A[i]);
      } LinkedHashSet.add(A[i]) LinkedHashSet.add LinkedHashSet A[i] A i Object[] A_after = LinkedHashSet.toArray(); A_after LinkedHashSet.toArray() LinkedHashSet.toArray LinkedHashSet return A_after.length; A_after.length A_after A_after.length String[] A A public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  }      
  static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  }
} public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  }      
  static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  }
} Main
import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      String[] A = new String[n];
      for(int i=0;i<n;i++){
        A[i]=sc.next();
      }
      int after=check(A);
      if(n==after){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
  }      
  static int check(String[] A){
      Set<String> LinkedHashSet = new LinkedHashSet<String>();
      for (int i=0;i<A.length;i++){
        LinkedHashSet.add(A[i]);
      }
      Object[] A_after = LinkedHashSet.toArray();
      return A_after.length;
  }
}