#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string.h>
#include<math.h>
#include<queue>
#include<iomanip>
//#include<bits/stdc++.h>
#define eps 1e-8
//#define inf 0x7f
#define inf 10000000
using namespace std;
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        if(n%10==9||n/10==9)
            printf("Yes\n");
        else
          printf("No\n");
    }
}
