#include<iostream>
using namespace std;
int main()
{
    char a[3];
    cin>>a;
    for(int i=0;i<2;i++)
    {
        if(a[i]=='9')
        {
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    cout<<"No"<<endl;
    return 0;
}
