#include <iostream>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n;
    b=n%10;
    a=n/10;
    if(a==9 || b==9)
    {
        cout<<"Yes"<<endl;
    }
    else
    {
        cout<<"No"<<endl;
    }
    return 0;
}
