#include<stdio.h> int main() { int M = 0; while (scanf("%d", &M) == 1) { if (M % 5 == 0) printf("YES\n"); else printf("NO\n"); } return 0; }