#include "stdio.h"int main(void){ int n; scanf("%d", &n); if (n % 35 == 0) printf("YES"); else printf("NO"); return 0;}