Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Equal Strings

By CHAKROBORTY · Limits 1s, 512 MB

You are given a string of length nn. You can do any of the following two operations in this string any number of times.

  1. If the first character is consonant then you can delete this character. If the first character is vowel then you can add (only one character) any character to this string at any position.

  2. If the last character is consonant then you can delete this character. If the last character is vowel then you can add (only one character) any character to this string at any position.

Can you make a string of length mm from the given string?

Input

The first line contains a single integer t(1t100)t \hspace{.1cm} (1 \leq t \leq 100) — the number of test cases.

Next tt lines contain the description of all test cases.

The first line of each test case contains two integers nn and m(1n100,0m10000)m \hspace{.1cm} (1 \leq n \leq 100, 0 \leq m \leq 10000) — length of the given string and length of the making string.

The second line of each test case contains a string of length nn (contains only lowercase letters).

Output

If you can make the length of the given string equal to mm then print "YES" (without quote).
Otherwise, print "NO" (without quote).

Sample

InputOutput
2 
5 8
hello
2 0
hi
YES
NO

The letters of the alphabet that we normally associate as being the vowel letters are: aa, ee, ii, oo and uu. Rest of the letters are considered as consonant.

    Discussion

    Statistics


    70% Solution Ratio

    tajbin_muEarliest, Oct '20

    tajbin_muFastest, 0.0s

    insane_curiousLightest, 0 B

    Rapid_VMShortest, 771B

    Submit

    Login to submit

    Toph uses cookies. By continuing you agree to our Cookie Policy.