#include<stdio.h>
int main(void){
  int N;
  int A,B,C;
  scanf("%d",&N);
  for(A = 0;N >= 100;A++){
    N = N - 100;
  }
  for(B = 0;N >= 10;B++){
    N = N - 10;
  }
  for(C = 0;N >= 1;C++){
    N = N -1;
  }
  if(A == 7){
    printf("Yes");
    return 0;
  }
  if(B == 7){
    printf("Yes");
    return 0;
  }
  if(C == 7){
    printf("Yes");
    return 0;
  }
  printf("No");
  return 0;
}