import java.util.*;

public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  }
} import java.util.*; util.* java public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  }
} Main public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  } main {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashMap<String, Integer> map = new HashMap<String, Integer>(); map new HashMap<String, Integer>() for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    } {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    } String a = sc.next(); a sc.next() sc.next sc map.put(a, map.getOrDefault(a, 0)) map.put map a map.getOrDefault(a, 0) map.getOrDefault map a 0 map.put(a, map.get(a) + 1) map.put map a map.get(a) + 1 map.get(a) map.get map a 1 sc.close() sc.close sc for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    } Map.Entry<String, Integer> e map.entrySet() map.entrySet map {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    } {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    } if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      } e.getValue() > 1 e.getValue() e.getValue e 1 {
        System.out.println("NO");
        System.exit(0);
      } System.out.println("NO") System.out.println System.out System System.out "NO" System.exit(0) System.exit System 0 System.out.println("YES") System.out.println System.out System System.out "YES" final String[] args args public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  }
} public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  }
} Main
import java.util.*;

public class Main {
  public static void main(final String[] args) {
    final Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    HashMap<String, Integer> map = new HashMap<String, Integer>();
    for (int i = 0; i < n; ++i) {
      String a = sc.next();
      map.put(a, map.getOrDefault(a, 0));
      map.put(a, map.get(a) + 1);
    }
    sc.close();

    for (Map.Entry<String, Integer> e : map.entrySet()) {
      if(e.getValue() > 1) {
        System.out.println("NO");
        System.exit(0);
      }
    }

    System.out.println("YES");
  }
}