#include<iostream>
#include<sstream>

using namespace std;

int main() {

	int n;
	cin >> n;
	int a;
	int b;
	int c;

	a = n - 700;
	if ((a >= 0) && (a <= 100)) {
		cout << "Yes" << endl;
		return 1;
	}
	else {
		b = n % 100;
		b = b - 70;
		if ((b >= 0) && (b <= 10)) {
			cout << "Yes" << endl;
			return 1;
		}
		else {
			c = n % 10;
			c = c - 7;
			if (c == 0) {
				cout << "Yes" << endl;
				return 1;
			}
			else {
				cout << "No" << endl;
			}
		}
	}

	return 0;
}
