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 len(T) == 1: exit(print('Yes' if T=='?' else 'No')) buf = '' for c in T: if c == 'w': if buf=='w' or buf=='a': exit(print('No')) buf = 'w' elif c == 'a': if buf=='a' or buf=='': exit(print('No')) buf = '' else: if buf=='w': buf = '' elif buf=='a': exit(print('No')) else: buf = '?' print('Yes')