from collections import deque N = int(input()) S = input() que = deque() for s in S: que.append(s) while que: el = que.popleft() if el == 'n': continue if el == 'w': if que and que[0] in ('?', 'a', 'o'): que.popleft() continue else: print("No") exit() if el == '?': if que and que[0] in ('a', 'o'): que.popleft() continue print("No") exit() print("Yes")