#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 0;
	}
	b = n % 100;
	b = b - 70;
	if ((b >= 0) && (b <= 10)) {
		cout << "Yes" << endl;
		return 0;
	}

	c = n % 10;
	c = c - 7;
	if (c == 0) {
		cout << "Yes" << endl;
		return 0;
	}
	cout << "No" << endl;
	return 0;
}
