#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;int m;
    int sum;
    while(~scanf("%d",&n))
    {
        m=sum=0;
        while(n>0)
        {
            m=n%10;
            if(m==9)
            {
                sum++;
            }
            n/=10;
        }
        if(sum!=0)
            printf("Yes\n");
        else
            printf("No\n");
    }
}