
import java.util.Scanner
import java.util.TreeSet

//
fun _Do() {

    val N_ = scan.nextInt()
    
    //--------
    println(when {
        N_%10==9 -> "Yes"
        N_/10==9 -> "Yes"
        else -> "No"
    })
}

var scan = Scanner(System.`in`)

fun strings(N:Int):Array<String>{
    var _s = Array(N,{""})
    for (i in _s.indices) {
        _s[i] = scan.next()
    }
    return _s
}

fun ints(N:Int):Array<Int>{
    var _s = Array(N,{0})
    for (i in _s.indices) {
        _s[i] = scan.nextInt()
    }
    return _s
}

fun longs(N:Int):Array<Long>{
    var _s = Array<Long>(N,{0})
    for (i in _s.indices) {
        _s[i] = scan.nextLong()
    }
    return _s
}
//
fun main( argv : Array<String> ) {
    _Do()
}
