print("Yes" if all(i == '9' for i in input()) else "No")