#include using namespace std; int main(){ int64_t N; cin >> N; int64_t ans = N; int count = 1; while(ans >= 9){ ans /= 9; count *= 9; } //cout << count << endl; if(count != 1) ans = N / (count/9) % 9; //cout << ans << endl; if(ans % 2 == 0) cout << "YES" << endl; else cout << "NO" << endl; }