#include<iostream> using namespace std; int main() { int n,k; cin>>n; k=n%15; if(k==0) { cout<<"YES"; } else { cout<<"NO"; } return 0; }