#include #include using namespace std; using namespace atcoder; using ll = long long; int main() { int N; cin >> N; string S; cin >> S; int i = 0; while (i < N) { if (S[i] == 'w') { if (i < N - 1) { if (S[i + 1] == 'a' || S[i + 1] == 'o' || S[i + 1] == '?') { i += 2; continue; } } cout << "No" << endl; return 0; } else if (S[i] == 'n') { i++; continue; } else if (S[i] == '?') { while (i < N) { if (S[i] != '?') break; i++; } if (i >= N) break; if (S[i] == 'w') continue; if (S[i] == 'a' || S[i] == 'o' || S[i] == 'n') { i++; continue; } cout << "No" << endl; return 0; } else { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }