/*dismint|jjc*/
#include <bits/stdc++.h>
using namespace std;

#define io(F) string t_="";ifstream fin(t_+F+".in");ofstreamfout(t_+F+".out")
#define qio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define forl(V, S, E) for(int V = S; V < E; V++)
#define ford(V, S, E) for(int V = S; V >= E; V--)
#define fore(E, X) for(auto &E:X)
#define println(X) cout << X << endl
#define printe(X) for(auto &E:X) cout << E << " "; cout << endl
#define setm(A, B, C) if(C) A = min(A, B); else A = max(A, B)
#define graph unordered_map<int, unordered_set<int>>
typedef long long ll;

int main() {
	qio; string s; cin >> s;
	if(count(s.begin(), s.end(), '7')) println("YES");
	else println("NO");
}
