#include<stdio.h>
int main()
{
  int N;
  scanf("%d", &N);
  if ( ( N - 7 ) % 10 == 0 ) {
    printf( "Yes" );
  }
  else if ( N % 100 >= 70 && N % 100 < 80 ) {
    printf( "Yes" );
  }
  else if ( N - 700 >= 0 && N - 700 < 100 ) {
    printf( "Yes" );
  }
  else {
    printf( "No" );
  }
  return 0;
}
