#include #define rep(i,a,n) for(int i = a; i < n; i++) #define yes (cout << "Yes" << endl) #define YES (cout << "YES" << endl) #define no (cout << "No" << endl) #define NO (cout << "NO" << endl) #define pb push_back #define pf push_front #define mp make_pair #define ALL(a) (a).begin(),(a).end() using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector; using vs = vector; using Graph = vector>; const int mod = 998244353; const int MOD = 1000000007; int dight_sum(int t) { int ans = 0; while(t >= 10) { ans += t % 10; t /= 10; } ans += t; return ans; } vector seen; void dfs(const Graph &G, int v) { seen[v] = true; // v を訪問済にする // v から行ける各頂点 next_v について for (auto next_v : G[v]) { if (seen[next_v]) continue; // next_v が探索済だったらスルー dfs(G, next_v); // 再帰的に探索 } } int main () { int n; cin >> n; string s; cin >> s; string t; rep(i,0,n) { if(s[i] != 'n') { t += s[i]; } } rep(i,0,t.size()) { if(t[i] == 'a' || t[i] == 'o' || t[i] == 'w' || t[i] == '?') { t += ""; } else { no; return 0; } } rep(i,0,t.size()) { if(t[i] == 'a' || t[i] == 'o') { if(i == 0) { no; return 0; } else { if(t[i - 1] != 'w' && t[i - 1] != '?' ){ no; return 0; } } } } yes; }