Harry Potter is on a mission to destroy You-Know-Who's Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle's diary. The diary was with Ginny and it forced her to open the Chamber of Secrets. Harry wants to know the different people who had ever possessed the diary to make sure they are not under its influence.

He has names of n people who possessed the diary in order. You need to tell, for each person, if he/she possessed the diary at some point before or not.

Formally, for a name si in the i-th line, output "YES" (without quotes) if there exists an index j such that si = sj and j < i, otherwise, output "NO" (without quotes).

Input

First line of input contains an integer n (1 ≤ n ≤ 100) — the number of names in the list.

Next n lines each contain a string si, consisting of lowercase English letters. The length of each string is between 1 and 100.

Output

Output n lines each containing either "YES" or "NO" (without quotes), depending on whether this string was already present in the stream or not.

You can print each letter in any case (upper or lower).

Examples

Input

6
tom
lucius
ginny
harry
ginny
harry


Output

NO
NO
NO
NO
YES
YES


Input

3
a
a
a


Output

NO
YES
YES

Note

In test case 1, for i = 5 there exists j = 3 such that si = sj and j < i, which means that answer for i = 5 is "YES".
import java.io.*;
import java.util.HashSet;
import java.util.Set;

public class ATom {

  private static final String REGEX = " ";
  private static final Boolean DEBUG = false;
  private static final String FILE_NAME = "input.txt";


  public static void main(String[] args) throws IOException {
    if (DEBUG) {
      generate();
    }
    Solver solver = new Solver();
    solver.readData();
    solver.solve();
    solver.print();
  }

  private static void generate() throws IOException {
//    FileWriter writer = new FileWriter("input.txt");
//    writer.close();
  }

  private static class Solver {
    private StringBuilder myStringBuilder = new StringBuilder();
    int n;
    String[] names;

    void readData() throws IOException {
      Scanner scanner = new Scanner();
      n = scanner.nextInt();
      names = new String[n];
      for (int i = 0; i < n; i++) {
        names[i] = scanner.nextLine();
      }
      scanner.close();
    }

    void solve() {
      Set<String> read = new HashSet<>();
      for (String name : names) {
        if (read.contains(name)) {
          out("YES\n");
        } else {
          read.add(name);
          out("NO\n");
        }
      }
    }

    void print() {
      System.out.println(myStringBuilder);
    }


    void out(Object object) {
      myStringBuilder.append(object);
    }

    void out(String string) {
      myStringBuilder.append(string);
    }

    public void out(boolean b) {
      myStringBuilder.append(b);
    }

    public void out(char c) {
      myStringBuilder.append(c);
    }

    public void out(int i) {
      myStringBuilder.append(i);
    }

    public void out(long lng) {
      myStringBuilder.append(lng);
    }

    public void out(float f) {
      myStringBuilder.append(f);
    }

    public void out(double d) {
      myStringBuilder.append(d);
    }

    public void newLine() {
      myStringBuilder.append("\n");
    }

    @SuppressWarnings("SameParameterValue")
    int[] splitInteger(String string, int n) {
      final String[] split = string.split(REGEX, n);
      int[] result = new int[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Integer.parseInt(split[i]);
      }
      return result;
    }

    public int[] splitInteger(String string) {
      return splitInteger(string, 0);
    }


    @SuppressWarnings("SameParameterValue")
    long[] splitLong(String string, int n) {
      final String[] split = string.split(REGEX, n);
      long[] result = new long[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Long.parseLong(split[i]);
      }
      return result;
    }

    public long[] splitLong(String string) {
      return splitLong(string, 0);
    }

    @SuppressWarnings("SameParameterValue")
    double[] splitDouble(String string, int n) {
      final String[] split = string.split(REGEX, n);
      double[] result = new double[split.length];
      for (int i = 0; i < n; ++i) {
        result[i] = Double.parseDouble(split[i]);
      }
      return result;
    }

    public double[] splitDouble(String string) {
      return splitDouble(string, 0);
    }

    @SuppressWarnings("SameParameterValue")
    String[] splitString(String string, int n) {
      return string.split(REGEX, n);
    }

    public int max(int a, int b) {
      return Math.max(a, b);
    }

    public int max(int[] arr) {
      int max = Integer.MIN_VALUE;
      for (int x : arr) {
        max = max(max, x);
      }
      return max;
    }

    public long max(long a, long b) {
      return Math.max(a, b);
    }

    public int min(int a, int b) {
      return Math.min(a, b);
    }

    public long min(long a, long b) {
      return Math.min(a, b);
    }

    public double max(double a, double b) {
      return Math.max(a, b);
    }

    public double min(double a, double b) {
      return Math.min(a, b);
    }

    private final static int MOD = 1000000009;

    int multMod(int a, int b) {
      return ((a % MOD) * (b % MOD)) % MOD;
    }

    int sumMod(int a, int b) {
      return ((a % MOD) + (b % MOD)) % MOD;
    }

    long multMod(long a, long b) {
      return ((a % MOD) * (b % MOD)) % MOD;
    }

    long sumMod(long a, long b) {
      return ((a % MOD) + (b % MOD)) % MOD;
    }

    int sum(int[] arr) {
      int sum = 0;
      for (int i = 0; i < arr.length; i++) {
        sum += arr[i];
      }
      return sum;
    }

    long sum(long[] arr) {
      long sum = 0;
      for (int i = 0; i < arr.length; i++) {
        sum += arr[i];
      }
      return sum;
    }

    private class Scanner {
      private int currentIndex = 0;
      private String[] objects;
      private final BufferedReader myReader;
      private Computable<Character> charComputer;
      private Computable<Double> doubleComputer;
      private Computable<Integer> intComputer;
      private Computable<Long> longComputer;

      Scanner() throws FileNotFoundException {
        InputStream in = DEBUG ? new FileInputStream(FILE_NAME) : System.in;
        myReader = new BufferedReader(new InputStreamReader(in));
        charComputer = () -> objects[currentIndex].charAt(0);
        doubleComputer = () -> Double.parseDouble(objects[currentIndex]);
        intComputer = () -> Integer.parseInt(objects[currentIndex]);
        longComputer = () -> Long.parseLong(objects[currentIndex]);
      }

      String nextLine() throws IOException {
        objects = null;
        currentIndex = 0;
        return myReader.readLine();
      }

      int nextInt() throws IOException {
        return next(intComputer);
      }

      int[] nextIntArray(int n) throws IOException {
        return splitInteger(nextLine(), n);
      }

      long[] nextLongArray(int n) throws IOException {
        return splitLong(nextLine(), n);
      }

      long nextLong() throws IOException {
        return next(longComputer);

      }

      double nextDouble() throws IOException {
        return next(doubleComputer);

      }

      char nextChar() throws IOException {
        return next(charComputer);
      }

      <T> T next(Computable<T> computer) throws IOException {
        T result;
        if (objects == null || currentIndex >= objects.length) {
          String s = myReader.readLine();
          objects = s.split(" ");
          currentIndex = 0;
        }
        result = computer.compute();
        currentIndex++;
        return result;
      }

      public void close() throws IOException {
        myReader.close();
      }

    }

    interface Computable<T> {
      T compute();
    }

  }

}
