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()

if n[0]==9 or n[1]==9:
  print("Yes")
else:
  print("No")
n = input()

if n[0]=="9" or n[1]=="9":
  print("Yes")
else:
  print("No")