N = input() c = N.count('1') if c==1: print('No') elif c==2: print('Yes') else: N = '0'+N run = 0 for i in range(len(N)-1): if N[i:i+2]=='01': run += 1 if run==1: print('Yes') else: print('No')