n = input() s = n.index("0") if n[:s] == "1"*s or n.count("1") == 2: print("Yes") else: print("No")