#include <bits/stdc++.h>

using namespace std;
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
 cin>>t;
 if (t % 10 == 7 || (t / 10) % 10 == 7 || (t / 100) % 10 == 7)cout<<"YES";
 else cout<<"NO";

   return 0;
}