N = int(input()) S = input() ans = 'Yes' i = -1 x = 0 while i < N: i += 1 s = S[i] if s == 'w': x = 0 if i == N - 1: ans = 'No' break if S[i+1] == 'o': continue elif S[i+1] == 'a': continue elif S[i+1] == '?': i += 1 continue else: ans = 'No' break elif s == 'o': if i == 0: ans = 'No' break if S[i-1] == 'w': x = 0 continue elif S[i-1] == '?': if x: x = 0 continue else: ans = 'No' break else: ans = 'No' break elif s == 'a': if i == 0: ans = 'No' break if S[i-1] == 'w': continue elif S[i-1] == '?': if x: x = 0 continue else: ans = 'No' break else: ans = 'No' break elif s == '?': x = 1 continue elif s == 'n': x = 0 continue else: x = 0 ans = 'No' continue print(ans)