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

int main() {
  int N, a, b, c, d;
  cin >> N;
  N / 100 == a;
  N - 100 * a == b;
  b / 10 == c;
  b - 10 * c == d;
  
  if(a == 7 || c == 7 || d == 7)
  {
    cout << "YES" << endl;
  }
  else
  {
cout << "NO" << endl;
  }
}