import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String n = br.readLine(); for(int i = 0 ; i < n.length() ; i++){ char c = n.charAt(i); if(c != '9'){ System.out.print("No"); return; } } System.out.print("Yes"); } }