#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a,x,y;
    scanf("%2d",&a);
    x=a%10;
    y=a-x*10;
    if(x==9||y==9)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}
