n = input() if n[len(n)-1] == "1": n = n[0:len(n)-1] + "0" count = n.count("1") if count == 1 or n.count("1") == len(n)-1: print("Yes") else: print("No") else: if n.count("1") == 2: print("Yes") else: index = n.find("0") if n[0:index].count("0") == 0 and n.count("1") >= 2 and n[index:len(n)].count("1") == 0: print("Yes") else: print("No")