S = input() if S.count("1") <= 1: print("No") exit() elif S.count("1") == 2: print("Yes") exit() S = S.strip("0") if S.count("0") == 0: print("Yes") else: print("No")