import scala.io.StdIn._
import scala.math._
 
object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  if((n/10)==9 || (n%10)==9){
    println("Yes")
  }
  else{
    println("No")
  }
}