#include <bits/stdc++.h>
using namespace std;
using ll = long long;



int main() {

    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int N,M;
    cin>>N>>M;
    string S,T,U;
    cin>>S;
    for(auto s:S){
        if(s=='W')T.push_back(s);
        else if(s=='A'&&M==0)T.push_back(s);
        else if(s=='A'){
            U.push_back(s);
            M--;
        }
        else U.push_back(s);
    }
    int k=0;
    for(auto t:T){
        if(t=='W')k++;
        else if(k==0){
            cout<<"No"<<endl;
            return 0;
        }
        else k--;
    }
    for(auto t:U){
        if(t=='A')k++;
        else if(k==0){
            cout<<"No"<<endl;
            return 0;
        }
        else k--;
    }
    cout<<"Yes"<<endl;
    
}