#include using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; template using V = vector; template using VV = V>; template using VVV = V>; template using VVVV = VV>; #define rep(i,n) for(ll i=0ll;i bool chmin(T& t, const U& u) { if (t > u){ t = u; return 1;} return 0; } template bool chmax(T& t, const U& u) { if (t < u){ t = u; return 1;} return 0; } // cin.tie(nullptr); // ios::sync_with_stdio(false); // cout << fixed << setprecision(20); void solve(){ ll n,m; string s; cin >> n >> m >> s; string ans = "Yes"; V w,a,c; rep(i, 2*n+2*m){ if(s[i] == 'W') w.eb(i); if(s[i] == 'A') a.eb(i); if(s[i] == 'C') c.eb(i); } rep(i, m) if(a[i] > c[i]) ans = "No"; rep(i, n) if(a[i+m] < w[i]) ans = "No"; cout << ans << endl; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int t=1; // cin >> t; rep(i,t) solve(); }