- Time limit: 1.00 s
- Memory limit: 512 MB
Given an array of integers, your task is to process queries of the following types:
- update the value at position to
- check if every value in range is distinct
Input
The first line has two integers and : the number of values and queries.
The second line has integers : the array values.
Finally, there are lines describing the queries. Each line has three integers: either " " or " ".
Output
For each query of type 2, print YES
if every value in the range is distinct and NO
otherwise.
Constraints
Example
Input:
5 4 3 2 7 2 8 2 3 5 2 2 5 1 2 9 2 2 5
Output:
YES NO YES