#include <bits/stdc++.h>
 using namespace std;
 using pii = pair<int, int>;
 using ll = long long;
 #define rep(i, j, n) for(int i = j; i < (int)(n); i++)
 const ll MOD = 1000000007;
 const ll INF = 1LL << 60;

 int main() {
   int N;
   bool ok = false;

   cin >> N;
   
   if (N / 100 == 7) ok = true;
   else if (N % 10 == 7) ok = true;
   else if (N / 10 % 10 == 7) ok = true;

   if (ok) cout << "YES" << endl;
   else cout << "NO" << endl;
 }
