#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double 
void q1(){
	int n; cin>>n;
	bool fg=1;
	int p[n], c[n];
	for(int i=0;i<n;++i) cin>>p[i]>>c[i];
	for(int i=0;i<n-1;++i){
		if(!(p[i]<=p[i+1] && c[i]<=c[i+1] && c[i]<=p[i])){
			fg=0; break;
		}
	}
	if(c[n-1]>p[n-1]) fg=0;
	int d[n]; for(int i=0;i<n;++i) d[i]=p[i]-c[i];
	for(int i=0;i<n-1;++i)
		if(d[i]>d[i+1])
			fg=0;
	if(fg) cout<<"YES\n";
	else cout<<"NO\n";
}
void q2(){
	int n;ld x; cin>>n>>x;
		ld a[n]; for(int i=0;i<n;++i) cin>>a[i];
		sort(a,a+n);
		ld avg=0,sum=0;
		for(int i=n-1;i>=0;--i){
			sum+=a[i];
			avg=sum/(n-i);
			if(avg<x){
				cout<<n-i-1<<"\n";
				return ;
			}
		}
		cout<<n<<"\n";
		return ;
}
void print(ld a[],int n){
	for(int i=0;i<n;++i)
		cout<<a[i]<<" ";
	cout<<"\n";
}
void q3(){
	int n; cin>>n;
	int a[n], d[n], e[n];
	int s=0;
	int mn=LLONG_MAX;
	for(int i=0;i<n;++i) cin>>a[i]>>d[i];
	for(int i=1;i<n;++i) e[i]=max(0ll,a[i]-d[i-1]);
	e[0]=max(0ll,a[0]-d[n-1]);
	for(int i=0;i<n;++i) s+=e[i];
	int idx=-1;
	for(int i=0;i<n;++i){
		if((a[i]-e[i])<mn) mn=a[i]-e[i];
	}
	//if(n==1) {cout<<a[0]<<"\n"; return ;}
	//s-=e[idx]; s+=a[idx];
	cout<<s+mn<<"\n";
}
int32_t main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif
	int t; t=1; //cin>>t;
	while(t--){
		int n; cin>>n;
		while(n!=0){
			if(n%10==7) {
				cout<<"YES\n";
				return 0;
			}
		}
		cout<<"NO\n";
	}
	return 0;
}