#include <stdio.h>
#include <math.h>
int main(void) {
    int a, b, n;
    while(1) {
        scanf("%d", &n);
        if(n < 100 || n > 999) {
            continue;
        }
        else {
            break;
        }
    }
    while(1) {
            for(a = 1; a <= 9; a++){
                for(b = 1; b <= 9; b++){
                    if(n/100 == 7 || n/10 == 10*a + 7 || n == 100*a + 10*b + 7) {
                    printf("Yes\n");
                    break;
                }
                else {
                    continue;
                }
                break;
            }
            break;
        }
        break;
    }
    while(1) {
        for(a = 1; a <= 9; a++) {
            for(b = 1; b <= 9; b++){
                if((n-10*a-b)/100==7 || (n-100*a-b)/10==7 || n-100*a-10*b==7) {
                    continue;
                }
                else {
                    printf("No\n");
                    break;
                }
                break;
            }
            break;
        }
        break;
    }
    return 0;
}