- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a string that consists of characters between a–z. The positions of the string are indexed .
Your task is to process operations of the following types:
- Change the character at position to
- Check if the substring from position to position is a palindrome
Input
The first input line has two integers and : the length of the string and the number of operations.
The next line has a string that consists of characters.
Finally, there are lines that describe the operations. Each line is of the form "1 " or "2 ".
Output
For each operation 2, print YES if the substring is a palindrome and NO otherwise.
Constraints
Example
Input:
7 5 aybabtu 2 3 5 1 3 x 2 3 5 1 5 x 2 3 5
Output:
YES NO YES