#include<stdio.h>
int main()
{ 
  int a,b,c;
  scanf("%d",&a);
  b=a%10;
  c=a/10;
  if(b==9)
    printf("Yes\n",a);
  else
    if(c==9)
      printf("Yes\n",a);
    else
      printf("No\n",a);
  return 0;   
}