#include <stdio.h>
#include <stdlib.h>

int main()
{int n,r,count;
scanf("%d",&n);
while(n>0){
    r=n%10;
    if(r==7){
        printf("YES");
        break;
    }else{
    count=0;
    n=n/10;
    }


}if(count==0){
printf("NO");}
}