Олимпиадный тренинг

Задача 33293. Has the number been seen before?


Задача

Темы: Множества
Dasha writes down a certain number of numbers, and Masha keeps track of whether the already written number is repeated or not. If repeated Masha says YES, if not - NO. Masha is tired and wants you to automate her work. Help her. 

Input: The first line contains the number of numbers N (1<=N<=100 000), the second line contains a list of numbers separated by a space. 
Output: For each number, print the word YES (in a separate line) if this number has previously occurred in the sequence, or NO if it has not.
 

 

Examples
# Input Output
1 6
1 2 3 2 3 4
NO
NO
NO
YES
YES
NO