N = int(input()) S = input() for c in S: if c not in 'waon?': exit(print('No')) T = S.replace('n','').replace('wa','').replace('wo','') if T=='': exit(print('Yes')) T = T.replace('o','a') assert all(c in 'wa?' for c in T) if T[0]=='a' or T[-1]=='w': exit(print('No')) assert False T = T.replace('?a','').replace('w?','') print('Yes'if all(c=='?' for c in T) else 'No')