#include int main(){ int N; std::cin >> N; if(N%90) std::cout << "No\n"; else std::cout << "Yes\n"; }