def main(): s = input().strip() cnt_1 = s.count('1') # Check condition A: exactly two '1's and non-consecutive if cnt_1 == 2: first = s.find('1') second = s.find('1', first + 1) if second != first + 1: print("Yes") return # Check condition B: contiguous '1's followed by '0's only pos = 0 while pos < len(s) and s[pos] == '1': pos += 1 rest = s[pos:] condition_b = '1' not in rest if condition_b: if cnt_1 == 1: print("No") else: print("Yes") else: print("No") if __name__ == "__main__": main()