Copy #include <stdio.h> int main() { int dig; int flag=0; scanf("%d", &dig); if(dig%4==0) flag=1; else if(dig%7==0) flag=1; else if(dig%44==0) flag=1; else if(dig%47==0) flag=1; else if(dig%74==0) flag=1; else if(dig%77==0) flag=1; else if(dig%447==0) flag=1; else if(dig%474==0) flag=1; else if(dig%477==0) flag=1; else if(dig%744==0) flag=1; else if(dig%747==0) flag=1; else if(dig%774==0) flag=1; else if(dig%777==0) flag=1; if(flag) printf("YES\n"); else printf("NO\n"); return 0; }