#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define sz(x) int(x.size())
#define pb push_back
#define int long long

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int MOD = 1e9 + 7;

int32_t main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n; cin >> n;
	string ans = "NO";
	if (n%10 == 7) ans = "YES\n";
	n /= 10;
	if (n%10 == 7) ans = "YES\n";
	n /= 10;
	if (n%10 == 7) ans = "YES\n";
	n /= 10;
	cout << ans;
}