import sys n = input() for i in range(len(n)): if n[i]!='9': print("No") sys.exit() print("Yes")