import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  } main {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<Integer, Integer> cnt = new HashMap<Integer, Integer>(); cnt new HashMap<Integer, Integer>() boolean ans = true; ans true for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      } {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      } int a = sc.nextInt() - 1; a sc.nextInt() - 1 sc.nextInt() sc.nextInt sc 1 if (cnt.containsKey(a)) ans = false; cnt.containsKey(a) cnt.containsKey cnt a ans = false ans false cnt.put(a, 1) cnt.put cnt a 1 System.out.println(ans ? "YES" : "NO") System.out.println System.out System System.out ans ? "YES" : "NO" ans "YES" "NO" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  }
} Main
import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      int n = sc.nextInt();
      Map<Integer, Integer> cnt = new HashMap<Integer, Integer>();
      boolean ans = true;
      for (int i = 0; i < n; i++) {
        int a = sc.nextInt() - 1;
        if (cnt.containsKey(a)) ans = false;
        cnt.put(a, 1);
      }
      System.out.println(ans ? "YES" : "NO");
    } finally {
      sc.close();
    }
  }
}