N = int(input()) N += 1 while True: N, m = divmod(N, 10) if m != 0: print("No") exit() if N == 1: print("Yes") exit()