#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     cin.tie(), cout.tie();     int n;     cin >> n;     int temp = 1;     int a[] = {4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777};     for (int i = 0; i < 14; i++) {       if (n % a[i] == 0) {         cout <<  YES  << endl;         temp = 0;         break;       }     }     if (temp) {       cout <<  NO  << endl;     }     return 0;   }   