#include #include #include using namespace std; typedef long long ll; #define debug(x) cerr << "[" << #x << "] : " << x << "\n"; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll a; cin >> a; if(a < 6) cout << "NO"; else if(a % 3 == 0) cout << "YES"; else cout << "NO\n"; }