N = int(input()) S = input() S.replace("wa", "") S.replace("wo", "") S.replace("n", "") S = list(S) n = len(S) i = 0 # ?は任意の文字を表す while i < n: if ( S[i] == "w" and S[i + 1] == "o" or S[i] == "?" and S[i + 1] == "o" or S[i] == "w" and S[i + 1] == "?" or S[i] == "?" and S[i + 1] == "?" ): i += 2 elif S[i] == "w" and S[i + 1] == "a": i += 2 elif S[i] == "n": i += 1 else: print("No") exit() print("Yes")