#include <stdio.h>
int main() 
{
    int M = 0;
    scanf("%d", &M);
    printf("%s", M%5 == 0 ? "YES" : "NO");
    return 0;
}