#include <cstdio>
#include <iostream>
using namespace std;

int main() {
    int M=0;
    cin>>M;
    if(M>=1 && M<=100000)
    {
        if(M%5==0)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;

    }
    return 0;

}