#include <stdio.h>

#define TRUE 1
#define FALSE 0

int judgeSeven_100(int input){
	int hundredsPlace = input / 100;
  	int isSeven = FALSE;
  
  if(hundredsPlace == 7){
  	isSeven = TRUE;
  }
  	
  return isSeven;
}

int judgeSeven_10(int input){
	int tensPlace = (input % 100) / 10;
	int isSeven = FALSE;
  
  if(tensPlace == 7){
    isSeven = TRUE;
  }
  
	return isSeven;
}

int judgeSeven_1(int input){
	int onesPlace = (input % 10);
  int isSeven = FALSE;
  
  if(onesPlace == 7){
  	isSeven = TRUE;
  }

  return isSeven;
}

int main(void){
  int input;
  char output = "No";
  
  scanf("%d", &input);
  
  if(judgeSeven_100(input) == true){
       printf("YES");
  }
  else if(judgeSeven_10(input) == true){
       printf("YES");
  }
  else if(judgeSeven_1(input) == true){
       printf("YES");
  }
  else{
  	printf("NO");
  }
  
  return 0;
}  
