#include<iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <functional>
#include <ctime>
#include <iomanip>
#include <sstream>
#include <algorithm>
#define ll long long
#define PI acos(-1)
#define mes(x,y) memset(x,y,sizeof(x))
#define FAST_IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;
ll GCD(ll a, ll b) {//最大公约数
	return b == 0 ? a : GCD(b, a % b);
}
ll Power(ll a, ll b, ll p) { //计算(a^b)%p;
	ll ans = 1;
	while (b) {
		if (b & 1) //等价于b%2，判断b的奇偶性
			ans = ans * a % p; //如果为奇数，证明该位为1，需要乘上a
		a = a * a % p; //计算a^(2^i)
		b >>= 1; //等价于b/=2;
	}
	return ans;
}
bool isprime(ll num)
{
	if (num == 2 || num == 3)
		return true;
	if (num % 6 != 1 && num % 6 != 5)
		return false;
	ll t = sqrt((double)num);
	for (ll i = 5; i <= t; i += 6)
		if (num % i == 0 || num % (i + 2) == 0)
			return false;
	return true;
}
string sum(string s1, string s2)
{
	if (s1.length() < s2.length())
	{
		string temp = s1;
		s1 = s2;
		s2 = temp;
	}
	int i, j;
	for (i = s1.length() - 1, j = s2.length() - 1; i >= 0; i--, j--)
	{
		s1[i] = char(s1[i] + (j >= 0 ? s2[j] - '0' : 0));   //注意细节
		if (s1[i] - '0' >= 10)
		{
			s1[i] = char((s1[i] - '0') % 10 + '0');
			if (i) s1[i - 1]++;
			else s1 = '1' + s1;
		}
	}
	return s1;
}
ll n, m, i, j, k, t;
string s;
int main() {
	FAST_IO;
	while (cin >> s) {
		if (s.find("7"))cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}