n = input()
tf = True
for i in n:
	if i != "9":
		tf = False
if tf:
	print("Yes")
else:
	print("No")