def main(): N = int(input()) if all(digit == "9" for digit in str(N)): print("Yes") else: print("No") if __name__ == "__main__": main()