CSES - KILO 2016 3/5 - XOR
  • Time limit: 2.00 s
  • Memory limit: 512 MB

Uolevi is creating a list of numbers. He is particularly interested in bitwise XORs of the numbers in his list. Sometimes Uolevi wonders if it is possible to form a given number as a bitwise XOR of one or more numbers in his list.

To help Uolevi, implement a data structure that maintains a list of numbers and supports the following operations:

  1. Add a number to the list
  2. Determine if it is possible to select one or more numbers in the list such that the bitwise XOR of the numbers is equal to a given number

Initially the list is empty.

Input

The first line contains an integer qq, the number of queries. Next qq lines each contain two integers tit_i and xix_i where tit_i is the type of the query. If the type is 11, you should add xix_i to the list. If the type is 22 you should determine if it is possible to form xix_i.

Output

For each query of type 22, output YES if it is possible to select one or more numbers in the list whose bitwise XOR is equal to xix_i, and otherwise output NO.

Constraints

  • 1q51051 \le q \le 5 \cdot 10^5
  • 0xi<2200 \le x_i < 2^{20}

Example

Input:

6
1 1
1 2
1 4
2 5
2 7
2 0

Output:

YES
YES
NO

Input:

5
2 5
1 3
2 1
1 6
2 5

Output:

NO
NO
YES