O=print N=int(input()) while N: if N%10!=9:O("No"),exit() N//=10 O("Yes")