local s = io.read() .. "0" local t = {} local spos = false for i = 1, #s do if s:byte(i) - 48 == 1 then if not spos then spos = i end tpos = i else if spos then table.insert(t, tpos - spos + 1) spos = false end end end if #t == 1 then print(1 < t[1] and "Yes" or "No") elseif #t == 2 then print((1 == t[1] and 1 == t[2]) and "Yes" or "No") else print("No") end