#include<bits/stdc++.h>
#define pf printf
#define sf scanf
typedef long long LL;
using namespace std;
int main()
{
    int t;

    /*while(t--)
    {

    }*/
    sf("%d",&t);
    int a=t%10;
    int b=t/10;
    if(a==9||b==9)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }


    return 0;
}
