n = set(input()) print("Yes" if len(list(n)) == 1 and list(n)[0] == "9" else "No")