#include <iostream>

using namespace std;

int main(){
   int n;
   cin>>n;
   int sen=n/100;
   int ten=n%100;
   ten=ten/10;
   int one=n%10;
    if((sen==7)||(ten==7)||(one==7)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }
}