Cards with Numbers
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

AFei has many cards. Each card has a number written on it. Now he wants to takes some out of his card and puts them in a box. And he wants to know whether the card with the number x was in the box. So he has the following two operations:
  • 0 x (It means to put a card with the number x in the box.
  • 1 x   (It means to query if there is a card with the number x in the box.)

输入描述:

The first line of the input is an integer n (1 <= n <= 106), the number of operations. Next n lines  represent n operations, and two integers k ( k∈{0,1}) and x (0<=x<=109)  are separated by spaces on each line, as described above.

输出描述:

For each query, output one line "yes" if there is a card with the number x in the box, otherwise output one line "no".
示例1

输入

复制
5
0 1
1 2
0 2
1 3
1 2

输出

复制
no
no
yes