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?
print("YES" if "9" in input() else "NO")
print("Yes"if"9"in input()else"No")