#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here
    string N;
    string ok ="NO";
    
    cin << N;
    
    for(int i=0;i<3;i++){
        if(N.at(i)=='7'){
          ok = "YES";
        }
    }
    
    cout << ok << endl;
    
}