#include <bits/stdc++.h>
using namespace std;
string N;

int main(){
    cin >> N;
    int count=0;
    for(int i=0;i<N.length();i++)
        if(N[i] == '7'){
            count++;
        }
    if(count == 1){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}