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".
//package september;

import java.io.*;
import java.util.*;
import java.lang.*;
public class cff {
	static PrintWriter out=new PrintWriter(System.out);
	static long mod=(long)1e9+7;
	static int vis[];
	static long xor[];
	static Long ar[];
	static ArrayList<ArrayList<Integer>> list;
	static int max;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		InputReader in=new InputReader(System.in);
	int n=in.nextInt();
	HashMap<String,Integer> hm=new HashMap<>();
	while(n>0){
		String str=in.readString();
		if(hm.containsKey(str))
			System.out.println("yes");
		else{
			System.out.println("no");
			hm.put(str,1);
		}
		
		n--;
	}
	}
	static class pair{
		int type ;
		int l;
		int r;
		pair(int type,int l,int r){
			this.type=type;
			this.l=l;
			this.r=r;
		}
	}
	static void dfs(int node,int level){
		if(vis[node]!=0){
			return;
		}
		vis[node]=1;
		max=Math.max(max, level);
		xor[level]^=ar[node];
		for(int x:list.get(node)){
			dfs(x,level+1);
		}
	}
	static double dist(long x1,long y1,long x2,long y2){
		return Math.pow((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2),0.5);
	}
	static class InputReader{
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		public InputReader(InputStream st) {
			this.stream = st;
		}
		public int read() {
			//*-*------clare------
			
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public double nextDouble(){
			String doub=readString();
			return Double.parseDouble(doub);
		}
		public float nextFloat(){
			String doub=readString();
			return Float.parseFloat(doub);
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int[] sieve(int n){
			int ar[]=new int[n+1];
			ar[0]=0;
			ar[1]=1;
			for(int i=2;i<ar.length;i++){
				if(ar[i]==0){
					for(int k=i;k<ar.length;k=k+i){
						if(ar[k]==0){
							ar[k]=i;
						}
					}
				}
			}
			return ar;
		}
		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public Long[] nextLongArray(int n){
			Long a[]=new Long[n];
			for(int i=0;i<n;i++){
				a[i]=nextLong();
			}
			return a;
		}
		public ArrayList<ArrayList<Integer>> initlist(int n){
			ArrayList<ArrayList<Integer>> list=new ArrayList<>();
			for (int i = 0; i <=n ; i++) {
				list.add(new ArrayList<Integer>());
			}
			return list;
		}
		public int[] initdp(int n){
			int ar[]=new int[n];
			for (int i = 0; i <n ; i++) {
				ar[i]=-1;
			}
			return ar;
		}
		public int[][] initdp(int n,int m){
			int ar[][]=new int[n][m];
			for (int i = 0; i <n ; i++) {
				for (int j=0;j<m;j++)
					ar[i][j]=-1;
			}
			return ar;
		}
		public char[] constring(String str){
			char []ar=new char[str.length()];
			for (int i = 0; i <str.length() ; i++) {
				ar[i]=str.charAt(i);

			}
			return ar;
		}
		public static long gcd(long a, long b) {
			a = Math.abs(a);
			b = Math.abs(b);
			while (b != 0) {
				long temp = a % b;
				a = b;
				b = temp;
			}
			return a;
		}

		public static int longCompare(long a, long b) {
			if (a < b) {
				return -1;
			}
			if (a > b) {
				return 1;
			}
			return 0;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


