def main(): N = input() if (bit_one_count := N.count("1")) == 1: print("No") return if bit_one_count == 2: print("Yes") return if len(N) == bit_one_count or bit_one_count == N.find("0"): print("Yes") return print("No") if __name__ == "__main__": main()