#include <bits/stdc++.h>
using namespace std;

int main() {
  string a ;
  cin >> a ;
  bool kekka = false;
  for (int i = 0; i < 3; i++) {
    char b = a.at(i);
      if(b=='7')
      {kekka=true;}
  }
  
  if(kekka==true)
  {cout << "YES" << endl;}
else{cout << "NO" << endl;}
    
    
    
    
}

