#include using namespace std; int main() { long long N; cin >> N; if(N % 6 == 5){ cout << "Yes" << endl; } else { cout << "No" << endl; } }