#include <bits/stdc++.h>
using namespace std;
const int sz = 26;

string solve(){
    int n, m;
    cin >> n >> m;
    string s;
    cin >> s;
    vector<int>cnt(sz, 0);
    for(int i = 0; i < n; i++){
        cnt[s[i] - 'a']++;
    }
    int k = 0;
    for(int i = 0; i < sz; i++){
        if(cnt[i] % 2 != 0) k++;
    }
    if (m < k) return "NO";
    else return "YES";
}

int main(){
    int t;
    cin >> t;
    while(t--){
        cout << solve() << "\n";
    }
    return 0;
}