#include<bits/stdc++.h>

using namespace std;

int main()
{
    char p;
    string s = "NO";

    for(int i = 0; i < 3; i++)
    {
        cin >> p;
        if(p - '0' == 7)
            s = "YES";
    }

    cout << s << endl;

    return 0;
}
