def main():
    s = input().strip()
    ones = s.count('1')
    if (len(s) > 1 and s.count('1') > 1 and s.startswith('1' * s.count('1'))) or s.count('1') == 2:
        print("Yes")
    else:
        print("No")
main()