#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; string s; cin >> n >> s; auto match = [](string s, string t) { for (int i = 0; i < s.size(); i++) { if (s[i] != t[i] && s[i] != '?' && t[i] != '?') { return false; } } return true; }; vector dp(n + 1); dp[0] = true; for (int i = 0; i < n; i++) { if (!dp[i]) { continue; } if (s[i] == 'n') { dp[i + 1] = true; } if (i < n - 1 && (match(s.substr(i, 2), "wa") || match(s.substr(i, 2), "wo"))) { dp[i + 2] = true; } } cout << (dp[n] ? "Yes" : "No") << endl; }