#include <iostream>
using namespace std;
int main()
{int n,s,g;
cin>>n;
s=n/10;
g=n%10;
if(s==9||g==9)
{
cout<<"Yes"<<endl;
//cout<<"The one's digit of "<<n<<" is 9.";
}
if(s!=9&&g!=9) 
{
cout<<"No"<<endl;//cout<<n<<" does not contain 9.";
return 0;
}
}