n = int(input()) S = input() l = ["wa","wo","n"] dp = set() if S[0] == "w": dp.add(S[0]) elif S[0] == "n": dp.add(S[0]) elif S[0] == "?": dp.add("w") dp.add("n") for s in S[1:]: ndp = set() for x in dp: if x == "n" or x == "a" or x == "o": if s == "n" or s == "w": ndp.add(s) elif s == "?": ndp.add("n") ndp.add("w") elif x == "w": if s == "a" or s == "o": ndp.add(s) elif s == "?": ndp.add("a") ndp.add("o") dp = ndp print("Yes" if dp else "No")