// #define _GLIBCXX_DEBUG #include using namespace std; #include using namespace atcoder; using ll = long long; #define rep(i,n) for (ll i = 0; i < (n); ++i) using vl = vector; using vvl = vector; using P = pair; #define pb push_back #define int long long #define double long double #define INF (ll) 3e18 // Ctrl + Shift + B コンパイル // Ctrl + C 中断 // ./m 実行 signed main(){ int n; cin >> n; string s; cin >> s; rep(i,n) if (s[i] == 'o') s[i] = 'a'; while(s.size()){ if (s.size() == 1) if (s.back() == 'n') {s.pop_back(); continue;} if (s.size() == 1) if (s.back() == '?') {s.pop_back(); continue;} if (s.size() >= 2){ if (s.back() == 'n') {s.pop_back(); continue;} if (s.substr(s.size()-2) == "wa") {s.pop_back(); s.pop_back(); continue;} if (s.substr(s.size()-2) == "w?") {s.pop_back(); s.pop_back(); continue;} if (s.substr(s.size()-2) == "?a") {s.pop_back(); s.pop_back(); continue;} if (s.substr(s.size()-2) == "??") {s.pop_back(); continue;} } cout << "No" << endl; return 0; } cout << "Yes" << endl; }