f = True for i in range(int(input())): s = input().lower()[0] for sym in "абв": if sym == s: f = True break else: f = False if not f: break if f: print("YES") else: print("NO")