#include using namespace std; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < s.size(); i++) { cnt += s[i] == '1'; } bool ok = true; for (int i = 0; i < s.size() - 1; i++) { if (s[i] == '0' && s[i + 1] == '1') ok = false; } if (cnt <= 1) { cout << "No" << endl; } else if (cnt == 2) { cout << "Yes" << endl; } else { if (ok) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }