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".

"""
def three_numbers():
    numbers = list(map(int, input().split(sep=' ')))
    m = max(numbers)
    for i in numbers:
        if i != m:
            print(m - i, end=' ')


def gen_and_card_game():
    card = input()
    my_cards = list(input().split(sep=' '))
    for i in my_cards:
        if i[0] == card[0] or i[1] == card[1]:
            print('YES')
            break
    else:
        print('NO')


def kazak_vus_and_contest():
    a, b, c = map(int, input().split(sep=' '))
    if a - b <= 0 and a - c <= 0:
        print('YES')
    else:
        print('NO')


def like_A():
    st = input()
    count_a = 0
    for i in st:
        if i == 'a':
            count_a += 1
    if count_a > len(st) - count_a:
        print(len(st))
    else:
        print(count_a + count_a - 1)


def three_piece_candies():
    n = int(input())
    for i in range(n):
        a, b, c = map(int, input().split(sep=' '))
        print((a + b + c) // 2)


def re_encryption():
    n = int(input())
    encryption = input()
    decipherment = ''
    k = 0
    while 0 != n:
        k += 1
        n -= k
    for i in range(1, k + 1):
        decipherment += encryption[0]
        encryption = encryption[i:]
    print(decipherment)


def two_type_burgers():
    n = int(input())
    for i in range(n):
        a, b, c = map(int, input().split(sep=' '))
        p_b, p_c = map(int, input().split(sep=' '))
        sum = 0
        if p_b > p_c:
            if a - b * 2 >= 0:
                a = a - b * 2
                sum += b * p_b
                if a - c * 2 >= 0:
                    sum += c * p_c
                else:
                    sum += a // 2 * p_c
            else:
                sum += a // 2 * p_b
        else:
            if a - c * 2 >= 0:
                a = a - c * 2
                sum += c * p_c
                if a - b * 2 >= 0:
                    sum += b * p_b
                else:
                    sum += a // 2 * p_b
            else:
                sum += a // 2 * p_c
        print(sum)


def throw_cub():
    n = int(input())
    for i in range(n):
        k = int(input())
        if k % 7 == 1:
            count = k // 7 + 1
        else:
            count = k // 7 + (k % 7 > 0)
        print(count)


def nasty_read_book():
    n = int(input())
    pages = list()
    for i in range(n):
        a, b = map(int, input().split(sep=' '))
        pages.append(a)
    current_page = int(input())
    for i in range(n - 1):
        if pages[i] <= current_page < pages[i + 1]:
            print(len(pages) - i)
            break
    else:
        print(1)


def Tokitsukaze_and_upgrade():
    n = int(input())
    residue = n % 4
    if residue == 0:
        print('1 A')
    elif residue == 1:
        print('0 A')
    elif residue == 2:
        print('1 B')
    else:
        print('2 A')


def make_triangle():
    a, b, c = map(int, input().split())
    if a + b > c:
        if a + c > b:
            if c + b > a:
                print(0)
            else:
                print(a - c - b + 1)
        else:
            print(b - a - c + 1)
    else:
        print(c - a - b + 1)


def phones_numbers():
    n = int(input())
    for i in range(n):
        count = int(input())
        number = input()
        if len(number) < 11:
            print('NO')
        else:
            if number.find('8', 0, len(number) - 10) > -1:
                print('YES')
            else:
                print('NO')


def even_lines():
    n = int(input())
    number = input()
    count = 0
    for i in range(n):
        if int(number[i]) % 2 == 0:
            count += i + 1
    print(count)


def Petya_origami():
    n, k = map(int, input().split(sep=' '))
    r = 2
    g = 5
    b = 8
    count_blocknot = (n * r - 1) // k + 1 + (n * g - 1) // k + 1 + (n * b - 1) // k + 1
    print(count_blocknot)


def game():
    n = int(input())
    numbers = list(map(int, input().split(sep=' ')))
    numbers = sorted(numbers)
    if len(numbers) % 2 == 0:
        print(numbers[n // 2 - 1])
    else:
        print(numbers[n // 2])


def Vitaliy_and_night():
    n, m = map(int, input().split(sep=' '))
    k = 0
    for i in range(n):
        windows = list(map(int, input().split(sep=' ')))
        for j in range(m):
            if windows[j * 2] == 1 or windows[j * 2 + 1] == 1:
                k += 1
    print(k)



def Nauuo_and_voices():
    x, y, z = map(int, input().split(sep=' '))
    if x + z < y:
        print('-')
    elif y + z < x:
        print('+')
    elif x == y and z == 0:
        print('0')
    else:
        print('?')


def scarborough_fair():
    n, m = map(int, input().split(sep=' '))
    st = list(input())
    for i in range(m):
        l, r, c1, c2 = map(str, input().split(sep=' '))
        for j in range(int(l) - 1, int(r)):
            if st[j] == c1:
                st[j] = c2
    print(*st, sep='')
"""

""" FAIL
def the_door():
    n = int(input())
    doors = sorted(list(map(int, input().split(sep=' '))))
    count = 0

    print(count)


the_door()
"""


"""
def gold_plate():
    w, h, k = map(int, input().split(sep=' '))
    sum = 0
    for i in range(k):
        sum += (w + h) * 2 - 4
        h -= 4
        w -= 4
    print(sum)



def another_one_bites_the_dust():
    a, b, c = map(int, input().split(sep=' '))
    sum = c * 2
    if a == b:
        sum += b * 2
    elif a > b:
        sum += b * 2 + 1
    else:
        sum += a * 2 + 1
    print(sum)



def fingerprints():
    n, m = map(int, input().split(sep=" "))
    numbers = list(map(int, input().split(sep=" ")))
    f = list(map(int, input().split(sep=" ")))
    for i in numbers:
        if i in f:
            print(i, end=" ")


"""


def diary_tom_reddle():
    n = int(input())
    names = list()
    for i in range(n):
        name = input()
        if name in names:
            print("YES")
        else:
            print("NO")
        names.append(name[:])


diary_tom_reddle()
