N = input() import sys for n in N: if n != "9": print('No') exit() print('Yes')