#include #include using namespace std; int main(){ string s; cin >> s; if(s.length() == 1){ cout << "No" << endl; return 0; } reverse(s.begin(), s.end()); int tmp = (s[0]-'0') + 10 * (s[1]-'0'); if(tmp%10 < 2 || tmp%10 > 4){ cout << "No" << endl; return 0; } tmp = tmp / 10 * 10; tmp -= 10; tmp /= 10; for(int i = 2; i < s.length(); i++){ if(tmp % 10 < 2 || tmp % 10 > 4){ cout << "No" << endl; return 0; }else{ tmp += 10 * (s[i]-'0'); tmp = tmp / 10 * 10; tmp -= 10; tmp /= 10; } } if(tmp == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }