import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); char[] s = sc.next().toCharArray(); int waCount = 0; int wCount = 0; boolean flag = false; for (int i = 0; i < s.length ; i++) { if(!flag && s[i] == 'W'){ flag = true; continue; } if(flag && s[i] == 'W'){ wCount++; continue; } if(flag && s[i] == 'A'){ waCount++; flag = false; continue; } if(!flag && s[i] == 'A'){ if(wCount > 0){ waCount++; } if(wCount > 0){ wCount--; } continue; } } int acCount = 0; int aCount = 0; flag = false; for (int i = 0; i < s.length ; i++) { if(!flag && s[i] == 'A'){ flag = true; continue; } if(flag && s[i] == 'A'){ aCount++; continue; } if(flag && s[i] == 'C'){ acCount++; flag = false; continue; } if(!flag && s[i] == 'C'){ if(aCount > 0){ acCount++; } if(aCount > 0){ aCount--; } continue; } } System.out.println((waCount + acCount == n + m && waCount == n && acCount == m) ? "Yes" : "No"); } }