#include using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ld inf=10000999999999900; int main(){ ll n; cin >> n; string s; cin >> s; bool ok=false; bool ok2=false; for (ll i = 0; i < s.size(); i++) { if (s[i]=='w') { if (ok) { cout << "No"<< endl; return 0; } ok=true; }else if (s[i]=='a'||s[i]=='o') { if (ok) { ok=false; }else{ if (ok2) { ok2=false; continue; } cout << "No"<< endl; return 0; } }else if (s[i]=='n') { if (ok) { cout << "No" << endl; return 0; } }else if (s[i]=='?') { if (!ok) { ok2=true; } }else{ cout << "No"<< endl; return 0; } if (s[i]!='w') { ok=false; } if (s[i]!='?') { ok2=false; } } if (ok) { cout << "No"<< endl; return 0; } cout << "Yes" << endl; }