#include<bits/stdc++.h>
using namespace std;
int main()
{
    int count=0;
    string s;
    cin>>s;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='7')
        {
            cout<<"YES"<<endl;
            break;
        }
        else
            count++;
    }
    if(count==3)
        cout<<"NO"<<endl;
}
