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 s_{i} in the i-th line, output "YES" (without quotes) if there exists an index j such that s_{i} = s_{j} 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 s_{i}, 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 s_{i} = s_{j} and j < i, which means that answer for i = 5 is "YES".

Difficulty: interview

Starter code:

Solutions:
def main():
    n = int(input())
    s = set()
    for _ in range(n):
        w = input()
        if w in s:
            print('YES')
        else:
            print('NO')
        s.add(w)

main()



import sys
#sys.stdin=open("data.txt")
input=sys.stdin.readline

n=int(input())

d=set()

for _ in range(n):
    i=input().strip()
    if i in d: print("YES")
    else: print("NO")
    d.add(i)


visited = []
for _ in range(int(input())):
	s = input()
	if(s in visited):
		print('YES')
	else:
		visited.append(s)
		print('NO')

n = int(input())

s = set()

for i in range(n):
    sl = input()
    if sl not in s:
        print("NO")
    else:
        print("YES")
    s.add(sl)

n = int(input())
names = set()
for i in range(n):
    s = input()
    if (s in names):
        print('YES')
    else:
        print('NO')
        names.add(s)


def list_input():
    return list(map(int,input().split()))
def map_input():
    return map(int,input().split())
def map_string():
    return input().split()
    
n = int(input())    
s = set([])
for _ in range(n):
  x = input()
  if x in s:
    print("YES")
  else:
    print("NO")
  s.add(x)  

n = int(input())
h = set()
for i in range(n):
    name = input()
    if name in h:
        print('YES')
    else:
        print('NO')
        h.add(name)

n=int(input())
d={}
for u in range(n):	
	l=input()
	if(l in d):
		print("YES")
	else:
		print("NO")
		d[l] = 1

n = int(input())
s = set()
for i in range(n):
    x = input()
    print({True:"YES",False:"NO"}[x in s])
    s.add(x)


N = int(input())

names = set()

T = 0
while T < N:
    T += 1
    name = input()
    if name in names:
        print("YES")
    else:
        print("NO")
        names.add(name)


a = set()
for i in range(int(input())):
    s = input()
    if s in a:
        print("YES")
    else:
        print("NO")
        a.add(s)


n = int(input())
s = []
for i in range(n):
    x = input()
    if x not in s:
        s.append(x)
        print("NO")
    else:
        print("YES")

n = int(input())
l1 = [input() for i in range(n)]
l2 = []
for i in range(n):
    if l1[i] in l2:
        print("YES")
    else:
        print("NO")
        l2.append(l1[i])


n = int(input())
s =set()
for i in range(n):
    k = input()
    if k in s:
        print("YES")
    else:
        print("NO")
    s.add(k)



def main():
    n = int(input())
    s = set()
    for i in range(n):
        name = input()
        if name in s:
            print("YES")
        else:
            print("NO")
        s.add(name)
    

def __starting_point():
    main()
__starting_point()

n = int(input())
lst = []
for i in range(n):
	s = input()
	if s in lst:
		print("YES")
	else:
		lst.append(s)
		print("NO")


3

n = int(input())
w = set()
for i in range(n):
    s = input()
    if s in w:
        print("YES")
    else:
        print("NO")
    w.add(s)


n = int(input())
d = {}
for i in range(n):
    s = input()
    if s in d:
        print("YES")
    else:
        print("NO")
        d[s] = 1

n = int(input())
a = []
for i in range(n):
    name = input()
    if(a.count(name) != 0):
        print("YES")
    else:
        print("NO")
        a.append(name)


n = int(input())
a = []
for i in range(n):
    s = input()
    if s in a:
        print('YES')
    else:
        print('NO')
        a.append(s)

n = int(input())

dd = {}

for _ in range(n):
    l = input()
    if l in dd:
        print("YES")
    else:
        print("NO")
    dd[l] = 1



n = int(input())

a = []
for x in range(n):
    x = input()
    a.append(x)

lst = []
for x in a:
    if not x in lst:
        print('NO')
        lst.append(x)
    else:
        print('YES')


n = int(input())
u = []
for _ in range(n):
       inp = input()
       if inp in u:
              print('YES')
       else:
              u.append(inp)
              print('NO')

t = int(input())
s = set()
while(t):
	t -= 1
	temp = input().strip()
	if temp in s:
		print("YES")
	else:
		print("NO")
	s.add(temp)