def f(n: int): if n == 0: return 0 if n == 1: return 1 elif n % 2 == 0: return f(n // 2) else: return 1 + min(f(n // 2), f((n + 1) // 2)) def main(): n = int(input(), 2) if f(n) == 2: print("Yes") else: print("No") if __name__ == "__main__": main()