s = input().strip() count_ones = s.count('1') if count_ones == 2: print("Yes") else: def check_condition_a(s): if '0' not in s: return True first_zero = s.index('0') return all(c == '0' for c in s[first_zero:]) def check_condition_b(s): if len(s) == 1: return False if s[0] == '1' and all(c == '0' for c in s[1:]): return False return True if check_condition_a(s): if check_condition_b(s): print("Yes") else: print("No") else: print("No")