Yet Another Bracket Sequence
题号:NC205339
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

One day, Little Gyro was playing with a series of Bracket Sequences, A Bracket Sequence is a string that only contains two kinds of characters '(' and ')'. Let us define a regular Bracket Sequence in the following way:
  1.  Empty sequence is a regular sequence.
  2.  If S is a regular sequence, then (S) is also a regular sequence.
  3.  If A and B are regular sequences, then A+B (the character '+' means splice the sequence A and B) is a regular sequence.
For example, all of the following sequences of characters are regular Bracket Sequences: (), (());
And all of the following character sequences are not: (, ), )(, ())), ((();
After randomly picking a Bracket Sequence from the series, Little Gyro was currently studying whether the selected Bracket Sequence is regular or not. While Little Gyro was carefully investigating the sequence, the naughty boy Onlystar came and changed some brackets at several specific positions. For each operation, the left bracket '(' will be replaced to the right bracket ')', and the right bracket ')' will be replaced to the left bracket '(' as well. All the operations will not alter the length of the whole Bracket Sequence.
It was really annoying that Little Gyro had to calculate the whole Bracket Sequence again and again. However, the troublemaker Onlystar thought that it was very funny.
Now Little Gyro send this task to you, after each step of Onlystar's operation, please tell Little Gyro whether the current Bracket Sequence is regular or not. Please help him.

输入描述:

Each input file only contains one test case.
The first line contains two integers n and m (1 ≤ n, m ≤ ), indicating the length of the given Bracket Sequence and the times of Onlystar change the Bracket Sequence.
The second line contains a string S and its length is n, indicating the given Bracket Sequence.
Then, the following m lines, each line contains a integer x (1 ≤ x ≤ n), indicating the position that Onlystar will change the Bracket Sequence, it means '(' will replace to ')' and ')' will replace to '('.

输出描述:

For each position, output "Yes" (without quotes) in a line if the Bracket Sequence is a regular Bracket Sequence after this operation. Otherwise, output "No" (without quotes) instead.
示例1

输入

复制
6 5
((())(
6
3
4
1
6

输出

复制
Yes
No
Yes
No
No