There is a sequence of length . The values of some elements are determined, and the values of some elements are not yet determined.
In the input, elements whose values are not determined are given as . Elements whose values are determined are given as integers between and , inclusive.
You can assign any integer to the undetermined elements. Note that there is no restriction on the range of the integers you can assign.
Given an integer , you want to know if it is possible to fill in the values of the undetermined elements so that the sequence satisfies the following condition.
The above equation must hold for all .
However, the sequence continuously changes due to queries. A query is one of the following two types.
- : Set the value of to .
- : Change the value of to an undetermined state.
Immediately after each query is performed, determine whether it is possible to appropriately fill in the undetermined elements to satisfy the above condition.
Input
The input is given in the following format.
If , it means the value of is not determined. If , it means the value of is determined.
The format of each is one of the following two.
Output
For each query, print YES if it is possible to satisfy the condition immediately after performing the query, and NO otherwise, one per line.
The output is case-insensitive. For example, printing YeS or yes instead of YES does not affect your score.
Constraints
- .
- .
- .
- .
- In the initial sequence, each is or an integer between and , inclusive.
- In query , , .
- In query , .
Subtasks
Samples
After the first query, the sequence is . For example, if you fill in the undetermined values to make it , the sum of all contiguous subarrays of length is , so the answer is YES.