#include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
bool pd1(int x)
{
bool c4 = false , c7 = false;
while(x != 0)
{
if(x != 4 && x != 7)
return false;
x /= 10;
}
return true;
}
bool pd2(int x)
{
if(x % 4 == 0 || x % 7 == 0 ||n % 47 == 0 || x % 74 == 0 || x % 44 == 0 || x % 77 == 0)
return true;
return false;
}
signed main()
{
cin >> n;
if(pd1(n) == true || pd2(n) == true)
cout << "YES";
else
cout << "NO";
return 0;
}
调半天了 求助