N = eval(input())

if '9' in N:

    print('Yes')

else:

    print('No')
N = str(eval(input()))



def answer(N: str) -> str:

    if '9' in N:

        return 'Yes'

    else:

        return 'No'



print((answer(N)))
N = eval(input())
if "9" in N:
    print("Yes")
else:
    print("No")

N = str(eval(input()))


def answer(N: str) -> str:
    if "9" in N:
        return "Yes"
    else:
        return "No"


print((answer(N)))

-N = eval(input()) -if "9" in N: -    print("Yes") -else: -    print("No") +N = str(eval(input())) + + +def answer(N: str) -> str: +    if "9" in N: +        return "Yes" +    else: +        return "No" + + +print((answer(N)))