def solve_a(): n = str(input()) cnt = 0 flag = 0 for i in range(len(n)): if int(n[i]) == 1: cnt += 1 if flag == 1: flag = 2 if int(n[i]) == 0: if flag != 2: flag = 1 if cnt == 2: print('Yes') elif cnt == 1: print('No') elif flag == 2: print('No') else: print('Yes') if __name__ == '__main__': solve_a()