    #include<bits/stdc++.h>
    #include <ext/pb_ds/tree_policy.hpp> 
    #include <functional> // for less 
    using namespace __gnu_pbds; 
    using namespace std;
    //typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;    
    #define ll            long long
    #define pb            push_back
    #define ppb           pop_back
    #define si            set <ll>
    #define endl          '\n'
    #define fr            first
    #define sc            second
    #define mii           map<ll ,ll >
    #define msi           map<string,ll >
    #define mis           map<ll , string>
    #define rep(i,a,b)    for(ll  i=a;i<b;i++)
    #define all(v)        v.begin(),v.end()
    #define sort(v)       sort(all(v))
    #define pii           pair<ll ,ll >
    #define vi            vector<ll >
    #define vii           vector<pair<ll , ll >>
    #define vs            vector<string>
    #define sz(x)         (ll)x.size()
    //#define M           1000000007
    #define bs            binary_search
    #define rev(a)        reverse(all(a));
    #define sp(n)         setprecision(n)
    #define spl           " "
    #define arr(a,n)      rep(i,0,n) cin>>a[i]
    #define mod           998244353
    #define show(a,n)     for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl;
    //#define N           100000000
    #define debug(x)    cout << #x << " is " << x << endl;
    #define time          cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    #define INF           1ll<<31
    using namespace std;
     /*
    ll modularExponentiation(ll x,ll n,ll mm)
    {
        ll result=1;
        while(n>0)
        {
            if(n % 2 ==1)
                result=(result * x)%mm;
            x=(x*x)%mm;
            n=n/2;
        }
        return result;
    }
    ll modInverse(ll A,ll mm)
    {
        return modularExponentiation(A,mm-2,mm);
    }
    const ll maxn=500*1000+100;
    ll n,m;
    ll parent[maxn];
    ll urank[maxn];   
    ll root(ll i)
    {
        while(parent[i] != i)
        {
            parent[i]= parent[ parent[ i ] ] ; 
            i = parent[ i ]; 
        }
        return i;
    }

    void merge(ll A,ll B)
    {
        ll root_A = root(A);
        ll root_B = root(B);
        if(root_A==root_B) return;
        if(urank[root_A] < urank[root_B ])
        {
        parent[ root_A ] = parent[root_B];
        urank[root_B] += urank[root_A];
        }
        else
        {
        parent[ root_B ] = parent[root_A];
        urank[root_A] += urank[root_B];
        }

    }
            ll tree[2000005],a[200005];
        void build(ll node,ll start,ll end)
        {
            if(start==end){
                tree[node]=a[start];
            }
            else
            {
                ll mid=(start+end)/2;
                build(2*node,start,mid);
                build(2*node+1,mid+1,end);
                tree[node]=min(tree[2*node],tree[2*node+1]);
            }
        }
        ll query(ll node,ll start,ll end,ll l ,ll r)
        {
            if(l<=start && r>=end) return tree[node];
            if(start>r || end<l) return 1000000000000;
            
                ll mid=(start+end)/2;
                ll p1=query(2*node,start,mid,l,r);
                ll p2=query(2*node+1,mid+1,end,l,r);
                return min(p1,p2);

        }
        void update(ll node,ll start,ll end,ll idx,ll val)
        {
            if(start==end){a[idx]=val;tree[node]=val;}
            else
            {
                ll mid=(start+end)/2;
                if(start<=idx && idx<=mid) 
                    update(2*node,start,mid,idx,val);
                else update(2*node+1,mid+1,end,idx,val);
                tree[node]=min(tree[2*node],tree[2*node+1]);
            }

        }
        ll gcd(ll a, ll b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        ll spf[MAXN];
        void sieve()
        {
            spf[1] = 1;
            for (ll i=2; i<MAXN; i++)
                spf[i] = i;
            for (ll i=4; i<MAXN; i+=2)
                spf[i] = 2;

            for (ll i=3; i*i<MAXN; i++)
            {
                if (spf[i] == i)
                {
                    for (ll j=i*i; j<MAXN; j+=i)
                    {
                    if (spf[j]==j)
                        spf[j] = i;
                    }
                }
            }
        }
        vector<ll> getFactorization(ll x)
        {
            vector<ll> ret;
            while (x != 1)
            {
                ret.push_back(spf[x]);
                x = x / spf[x];
            }
            return ret;
        }
        ll findGCD(vi v, ll n)
        {
            ll result = v[0];
            for (ll i = 1; i < n; i++)
                result = gcd(v[i], result);

            return result;
        }
        ll checkPrimeNumber(ll n)
        {
          bool flag = true;

          for(ll i = 2; i <= sqrt(n); ++i)
          {
              if(n%i == 0)
              {
                  flag = false;
                  break;
              }
          }
          return flag;
        }
        ll min(ll a,ll b)
        {
            return a<b?a:b;
        }

    vector<bool> prime(N+1,true);
    void SieveOfEratosthenes()
    {
        prime[0]=false;
        prime[1]=false;
        for (ll p=2; p*p<=N; p++)
        {
            if(prime[p] == true)
            {
              for (ll i=p*p; i<=N; i += p)
                prime[i] = false;
            }
        }
    }
    
       vector<ll> ret;
       vector<ll> getFactorization(ll n)
        {

            for(ll i=1;i<=sqrt(n);i++)
                if(n%i==0)
                {
                    if(i!=n/i) ret.pb(n/i),ret.pb(i);
                    else ret.pb(i);
                }
            return ret;

        }
    ll modularExponentiation(ll x,ll n,ll mm)
    {
        ll result=1;
        while(n>0)
        {
            if(n % 2 ==1)
                result=(result * x)%mm;
            x=(x*x)%mm;
            n=n/2;
        }
        return result;
    }
    ll modInverse(ll A,ll mm)
    {
        return modularExponentiation(A,mm-2,mm);
    }
    ll checkPrimeNumber(ll n)
        {
          bool flag = true;

          for(ll i = 2; i <= sqrt(n); ++i)
          {
              if(n%i == 0)
              {
                  flag = false;
                  break;
              }
          }
          return flag;
        }
    ll min(ll a,ll b)
    {
        return a>b?b:a;
    }
    ll max(ll a,ll b)
    {
        return a>b?a:b;
    }
    vector<bool> prime(N+1,true);
    void SieveOfEratosthenes()
    {
        prime[0]=false;
        prime[1]=false;
        for (ll p=2; p*p<=N; p++)
        {
            if(prime[p] == true)
            {
              for (ll i=p*p; i<=N; i += p)
                prime[i] = false;
            }
        }
    }


    vector<ll> divisors(int n)
    {
        vi res;
        for (int i=1; i<=sqrt(n); i++)
        {
            if (n%i == 0)
            {
                if (n/i == i)
                    res.pb(i);

                else {
                    res.pb(i);
                    res.pb(n/i);
                }
            }
        }
        return res;
    }
    vector<ll> primeFactors(int n)  
    {  

    vi v;
    while (n % 2 == 0)  
    {  
        v.pb(2);
        n = n/2;  
    }  
    for (ll i = 3; i <= sqrt(n); i = i + 2)  
    { 
        while (n % i == 0)  
        {  
            v.pb(i); 
            n = n/i;  
        }  
    }  
 
    if (n > 2)  
        v.pb(n); 
    return v;
}  
    ll modularExponentiation(ll x,ll n,ll mm)
    {
        ll result=1;
        while(n>0)
        {
            if(n % 2 ==1)
                result=(result * x)%mm;
            x=(x*x)%mm;
            n=n/2;
        }
        return result;
    }
     ll modInverse(ll A,ll mm)
    {
        return modularExponentiation(A,mm-2,mm);
    }
    bool sortbysec(pair<ll,ll> a,pair<ll,ll> b)
    {
      return a.sc<b.sc;
    }
    const int M = (int)(2e6 + 239);
    ll pref[M], c;
    string longest_palindromic_prefix(const string& s)
    {
        string a = s;
        reverse(a.begin(), a.end());
        a = s + "#" + a;
        c = 0;
        for (ll i = 1; i < (int)a.size(); i++)
        {
            while (c != 0 && a[c] != a[i])
                c = pref[c - 1];
            if (a[c] == a[i])
                c++;
            pref[i] = c;
        }
        return s.substr(0, c);
    }
    */
    ll min(ll a,ll b)
    {
        return a>b?b:a;
    }
    ll max(ll a,ll b)
    {
        return a>b?a:b;
    }
    const ll maxn=2e5+500;
    void solve()
    {  
      ll n;
      cin>>n;
      if(n%10 ==7){cout<<"YES"<<endl;return;}
      n/=10;
      if(n%10 ==7){cout<<"YES"<<endl;return;}
      n/=10;
      if(n%10 ==7){cout<<"YES"<<endl;return;}
      cout<<"NO"<<endl;
    }
    signed main()
    {
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
        #ifndef ONLINE_JUDGE
        //freopen("input.txt","r",stdin);
        //freopen("output.txt","w",stdout);
        #endif
        ll t=1;
        //cin>>t;
        while(t--) solve();
    }
    
   
