#include <stdio.h>

int main(void) {

    int i;
    int a, b, c;


    scanf("%d", &i);

    a = i / 100;
    b = (i - a * 100) / 10;
    c = i - a*100 - b*10;

    if ( a == 7 ){
        printf("YES");
    } else if ( b == 7 ){
        printf("YES");
    } else if ( c == 7 ){
        printf("YES");
    } else {
        printf("NO");
    }

    return 0;
}