It is September 9 in Japan now.  You are given a two-digit integer N. Answer the question: Is 9 contained in the decimal notation of N?
n = input()
b = [int(x) for x in list(str(n))]

for i in b:
    if i == 9:
        print("NO")
        break
n = int(input())

b = [int(x) for x in list(str(n))]

if b[0] == 9 or b[1] == 9:
    print('Yes')
else:
    print('No')