You are given a string and a length . Are all the substrings of length of palindromes?
For instance, let
“ababa” and
.
Here, we have
“aba”,
“bab” and
“aba”. Since the three substrings of
of length 3 are palindomes, in this case the answer is positive.
Input consists of several cases, each with and . Let be the size of . You can assume , and that is made up of only lowercase letters.
For every case, print “yes” or “no”.
Input
ababa 3 abracadabra 5 zz 2
Output
yes no yes