#include <bits/stdc++.h>
using namespace std;
 
int main() {
	// your code goes here
	int n;
	cin>>n;
	
	int a=n%10;
	int b=(n%100);
	
	if((n>699  && n<800) || (a==7) || (b>69 && b<80))
	cout<<"Yes";
	else
	cout<<"No";
	
	return 0;
}