#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; string s; cin >> n >> s; vector dp(n + 1, vector(2, false)); dp[0][0] = true; rep(i, n) { switch (s[i]) { case 'w': if (dp[i][0]) dp[i + 1][1] = true; break; case 'a': if (dp[i][1]) dp[i + 1][0] = true; break; case 'o': if (dp[i][1]) dp[i + 1][0] = true; break; case 'n': if (dp[i][0]) dp[i + 1][0] = true; break; case '?': if (dp[i][0]) dp[i + 1][1] = true; if (dp[i][1]) dp[i + 1][0] = true; } } cout << (dp[n][0] ? "Yes" : "No") << endl; return 0; }