n=int(input()) s=list(input()) s.reverse() while len(s): if len(s)>1 and ("".join(s[len(s)-2:])=="aw" or "".join(s[len(s)-2:])=="ow" or "".join(s[len(s)-2:])=="?w"): for i in range(2):s.pop() elif s[-1]=="n":s.pop() elif s[-1]=="?": if len(s)>1 and (s[-2]=="o"or s[-2]=="a"): for i in range(2):s.pop() else:s.pop() else: print("No") exit() print("Yes")