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