#CF2236B. 鞑靼电视节目 / B. Tatar TV Show

鞑靼电视节目 / B. Tatar TV Show

B. Tatar TV Show

Source: Codeforces 2236B
Contest: Codeforces Round 1103 (Div. 3)
Time limit: 2 seconds
Memory limit: 256 megabytes

Statement

During the holidays, Egor came to visit his friend Dabir in the city of Kazan. Out of boredom, Dabir and Egor came up with a new business idea: to make their own TV show.

The format of the show is very simple: in each episode they invite a guest and play a game with them on a binary string.

In today's episode, Egor and Dabir invited Arseniy (aka MAKAN) — the main celebrity of Omsk. For the game, they chose a binary string ss of length nn and an integer kk.

Arseniy can make an unlimited number of moves. In one move, he can choose an integer ii (1ink1 \le i \le n - k) and invert the characters at positions ii and i+ki + k, that is, change 00 to 11 and 11 to 00.

For example, if s=10110s = 10110 and k=2k = 2, then by choosing i=2i = 2, Arseniy inverts the characters at positions 22 and 44: [1011011100][ 10110 \rightarrow 11100 ]

Arseniy wants to get the main prize — 10000001\,000\,000 tugriks. To do this, he needs to make the entire string ss equal to zero.

Help Arseniy determine whether he can get his prize, or if he will have to return to Omsk with nothing.

Input

The first line contains a single integer tt (1t1041 \le t \le 10^4) — the number of test cases.

The first line of each test case contains two integers nn and kk (1kn21051 \le k \le n \le 2 \cdot 10^5).

The second line of each test case contains a binary string ss of length nn.

It is guaranteed that the sum of nn over all test cases does not exceed 21052 \cdot 10^5.

Output

For each test case, output "YES" if Arseniy can make the string entirely zero, and "NO" otherwise.

You can output "YES" and "NO" in any case (for example, "yES", "yes", and "Yes" will be accepted).

Examples

5
4 2
1010
3 2
111
3 3
111
3 1
110
1 1
1
YES
NO
NO
YES
NO