#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin>>s;
    int j=0,i;
    for(i=0;i<=2;i++)
    {
        if(s[i]=='7')
            j++;
    }
    if(j==0)
        cout<<"NO";
    else
        cout<<"YES";
    return 0;
}
