fun main(args: Array) { val (y,m,d) = readLine()!!.split(" ").map { it.toInt() } val ymd = y*10000 + m*100 + d val isHeisei = ymd in (19890108..20190430) println(if(isHeisei) "Yes" else "No") }