#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n && n) {
if (n % 7 == 0) {
cout << "Yes" << "\n";
continue;
} else
while (n) {
if (n % 10 == 7) {
cout << "Yes" << "\n" ;
break;
} else {
n /= 10;
}
}
if (n == 0) {
cout << "No\n";
}
}
return 0;
}
判断一些数是不是含有7或者能被七整除