func main() var n: int :: cui@inputInt() var m: int :: cui@inputInt() var s: []char :: cui@input() var ans: bool :: true block var w: int :: 0 var a: int :: 0 var c: int :: 0 for i(0, ^s - 1) switch(s[i]) case 'W' do w :+ 1 case 'A' do a :+ 1 case 'C' do c :+ 1 if(a < c) do ans :: false break i end if do a :- 1 do c :- 1 end switch end for end block block var w: int :: 0 var a: int :: 0 var c: int :: 0 do s.reverse() for i(0, ^s - 1) switch(s[i]) case 'C' do w :+ 1 case 'A' do a :+ 1 case 'W' do c :+ 1 if(a < c) do ans :: false break i end if do a :- 1 do c :- 1 end switch end for end block do cui@print((ans ?("Yes", "No")) ~ "\n") end func