#include <bits/stdc++.h>
typedef long long int ll;
#define MOD 1000000007
#define MAXN 200001
#define f(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rf(i,a,b) for(ll i=(ll)(a);i>=(ll)(b);i--)
using namespace std;

int main() {
    string s;
    cin >> s;
    
    f(i,0,s.size()){
        if(s[i]=='7'){
            cout << "YES";
            s.clear();
            break;
        }
    }
    if(!s.empty()){
        cout << "NO";
    }
}