#include<bits/stdc++.h>
using namespace std;
 
typedef long long int ll;
 
int main(){
    ll x;
    cin>>x;
    while(x!=0){
        ll r=x%10;
        x=x/10;
        if(r==7){
            cout<<"YES"<<endl;
            return 0;
        }
    }
    cout<<"NO"<<endl;
    return 0;
}