#include<bits/stdc++.h>
using namespace std;
int main(){
int n;bool f = 1;
cin>>n;
while(n){
    int rmdr;
    rmdr = n%10;
    if(rmdr == 7)
        f = 0;
    n /=10;
}
if(f==0)
    cout<<"YES"<<endl;
else
    cout<<"NO"<<endl;
}
