N = ["0"] + list(input()) if N.count("1") == 1: print("No") exit() if N.count("1") == 2: print("Yes") exit() flag = 0 flag2 = 0 for i in range(len(N) - 1): if N[i] == "0" and N[i + 1] == "1": flag = 1 if flag2: print("No") exit() if N[i] == "1" and N[i + 1] == "0" and flag: flag2 = 1 print("Yes")