#include <stdio.h>

int main()
{
  int num, flag;
  
  num = flag = 0;
  
  while(num<100 || num > 999)
    scanf("%d", &num);
  
  if(num>=700)
  {
    num-=700;
    if(num<100)
      flag=1;
  }
  
  while(num>=100)
    num-=100;
  
  if(flag!=1)
  {
    if (num>=70)
    {
      num-=70;
      if (num<10)
        flag=1;
    }
    
    while(num>=10)
      num-=10;
    
    if (flag!=1)
    {
      if (num==7)
        flag=1;
    }
  }
  
  if (flag==1)
    printf("Yes \n");
  else
    printf("No \n");
  
  return 0;
}
