#arc155a. [arc155_a]ST and TS Palindrome

[arc155_a]ST and TS Palindrome

Problem Statement

You are given a string SS of length NN consisting of lowercase English letters, and a positive integer KK.

Determine whether there is a string SS' of length KK that satisfies the following conditions.

  • The concatenation of SS and SS' in this order is a palindrome.
  • The concatenation of SS' and SS in this order is a palindrome.

You have TT test cases to solve.

Constraints

  • 1leqTleq1051 \\leq T \\leq 10^5
  • 1leqNleq2times1051 \\leq N \\leq 2 \\times 10^5
  • 1leqKleq10181 \\leq K \\leq 10^{18}
  • SS is a string of length NN consisting of lowercase English letters.
  • All numbers in the input are integers.
  • In each input file, the sum of NN over the test cases is at most 2times1052 \\times 10^5.

Input

The input is given from Standard Input in the following format:

TT mathrmcase1\\mathrm{case}_1 vdots\\vdots mathrmcaseT\\mathrm{case}_T

Each case is in the following format:

NN KK SS

Output

Print TT lines. The ii-th line should contain Yes if there is a string SS' that satisfies the conditions for the ii-th test case, and No otherwise.


Sample Input 1

2
6 2
abbaab
5 3
abcbb

Sample Output 1

Yes
No

For the first test case, if we let S=S' = {}ba, for instance, the concatenation of SS and SS' in this order will be abbaabba, which is a palindrome. Here, the concatenation of SS' and SS in this order is baabbaab, which is also a palindrome. Thus, S=S' = {}ba satisfies the condition, so the answer is Yes.

For the second test case, we can prove that no string satisfies the conditions.


Sample Input 2

3
12 400378271514996652
njvhhvjnnjvh
10 884633988115575508
rrhiyvrrur
36 71630165869626180
vsxmxajrrduhhudrrjaxmxsvvsxmxajrrduh

Sample Output 2

Yes
No
Yes