n=input() print("Yes" if all([i=="9" for i in n]) else "No")