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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors;
public class _p000855A {
    static public void main(final String[] args) throws IOException {
        p000855A._main(args);
    }
//begin p000855A.java
static private class p000855A extends Solver{public p000855A(){nameIn="p000855A.in"
;singleTest=true;}int n;String[]s;@Override protected void solve(){TreeSet<String>
set=new TreeSet<>();for(int i=0;i<n;i++){if(set.contains(s[i])){pw.println("YES"
);}else{pw.println("NO");set.add(s[i]);}}}@Override public void readInput()throws
IOException{n=sc.nextInt();if(sc.hasNextLine()){sc.nextLine();}s=new String[n];for
(int _is=0;_is<n;_is++){s[_is]=sc.nextLine().trim();}}static public void _main(String
[]args)throws IOException{new p000855A().run();}}
//end p000855A.java
//begin net/leksi/contest/Solver.java
static private abstract class Solver{protected String nameIn=null;protected String
nameOut=null;protected boolean singleTest=false;protected boolean preprocessDebug
=false;protected boolean doNotPreprocess=false;protected Scanner sc=null;protected
PrintWriter pw=null;private void process()throws IOException{if(!singleTest){int
t=lineToIntArray()[0];while(t-->0){readInput();solve();}}else{readInput();solve(
);}}abstract protected void readInput()throws IOException;abstract protected void
solve()throws IOException;protected int[]lineToIntArray()throws IOException{return
Arrays.stream(sc.nextLine().trim().split("\\s+")).mapToInt(Integer::valueOf).toArray
();}protected long[]lineToLongArray()throws IOException{return Arrays.stream(sc.nextLine
().trim().split("\\s+")).mapToLong(Long::valueOf).toArray();}protected String joinToString
(final int[]a){return Arrays.stream(a).mapToObj(Integer::toString).collect(Collectors
.joining(" "));}protected String joinToString(final long[]a){return Arrays.stream
(a).mapToObj(Long::toString).collect(Collectors.joining(" "));}@Deprecated protected
String intArrayToString(final int[]a){return joinToString(a);}@Deprecated protected
String longArrayToString(final long[]a){return joinToString(a);}protected<T>String
joinToString(final T[]a){return Arrays.stream(a).map(v->v.toString()).collect(Collectors
.joining(" "));}protected<T>String joinToString(final T[]a,final Function<T,String>
toString){return Arrays.stream(a).map(v->v.toString()).collect(Collectors.joining
(" "));}protected<T>String joinToString(final Collection<T>a){return a.stream().map
(v->v.toString()).collect(Collectors.joining(" "));}protected<T>String joinToString
(final Collection<T>a,final Function<T,String>toString){return a.stream().map(v->
toString.apply(v)).collect(Collectors.joining(" "));}@Deprecated protected List<Long>
longArrayToList(final long[]a){return Arrays.stream(a).mapToObj(Long::valueOf).collect
(Collectors.toList());}@Deprecated protected List<Integer>intArrayToList(final int
[]a){return Arrays.stream(a).mapToObj(Integer::valueOf).collect(Collectors.toList
());}protected List<Long>intArrayToLongList(final int[]a){return Arrays.stream(a
).mapToObj(Long::valueOf).collect(Collectors.toList());}protected List<Integer>toList
(final int[]a){return Arrays.stream(a).mapToObj(Integer::valueOf).collect(Collectors
.toList());}protected List<Long>toList(final long[]a){return Arrays.stream(a).mapToObj
(Long::valueOf).collect(Collectors.toList());}protected void run()throws IOException
{boolean done=false;if(nameIn !=null){try{try(FileInputStream fis=new FileInputStream
(nameIn);PrintWriter pw0=select_output();){done=true;sc=new Scanner(fis);pw=pw0;
process();}}catch(IOException ex){}}if(!done){try(PrintWriter pw0=select_output(
);){sc=new Scanner(System.in);pw=pw0;process();}}}private PrintWriter select_output
()throws FileNotFoundException{if(nameOut !=null){return new PrintWriter(nameOut
);}return new PrintWriter(System.out);}}
//end net/leksi/contest/Solver.java
}
