# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
from collections import *

# from heapq import *
# from itertools import *
# from math import *
# from datetime import *
# from decimal import *  # PyPyだと遅い
# from string import ascii_lowercase,ascii_uppercase
# import numpy as np
import sys
import os

# sys.setrecursionlimit(10**6) # PyPyだと遅い
INF = 10**18
MOD = 998244353
# MOD = 10**9 + 7
isFile = os.path.exists("input.txt")
File = open("input.txt", "r", encoding="utf-8") if isFile else sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////


N = int(input())
S = deque(input())

for _ in range(INF):
    # print(S)
    if len(S) == 0:
        break
    if len(S) == 1:
        if S[0] not in ["n", "?"]:
            print("No")
            exit()
        else:
            break

    if S[0] == "n":
        S.popleft()
        continue
    elif S[0] == "w":
        S.popleft()
        if S[0] not in ["a", "o", "?"]:
            print("No")
            exit()
        else:
            S.popleft()
    else:
        if S[0] != "?":
            print("No")
            exit()
        else:
            S.popleft()
            if S[0] in ["a", "o"]:
                S.popleft()

print("Yes")