#include<bits/stdc++.h>
#define re register
using namespace std;

inline int read(){
	re int ans = 0;re bool f = 1;re char ch = getchar();
	while(ch<'0'||ch>'9'){if (ch=='-')f = 0;ch = getchar();}
	while(ch>='0'&&ch<='9'){
		ans = (ans<<3)+(ans<<1)+(ch^48);
		ch = getchar();
	}
	return f?ans:~(ans-1);
}

signed main(void){
	string a;
	cin>>a;
	for(re int i=0;i<3;++i){
		if(a[i]=='7'){
			printf("YES");
			return 0;
		}
	}
	printf("NO");
	return 0;
}