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

int main(){
    int n;
    cin >> n;
    int i;
    string result;
    result = "No";
    for(i=0;i<3;i++){
        n = n % 10;
        cout << n << endl;
        if(n == 7){
            result = "Yes";
            break;
        }
    }
    cout << result << endl;
}