n,m=map(int,input().split()) s=input() A=[] C=[] W=[] for i in range(2*(n+m)): if s[i]=='W': W.append(i) elif s[i]=='A': A.append(i) else: C.append(i) ans='Yes' A1=A[:m] A2=A[m:] for i in range(m): if A1[i]>C[i]: ans='No' for i in range(n): if A2[i]