fun main(args: Array) { val (a,b) = readLine()!!.split(" ").map { it.toInt() } println(if(a+1 <= b) "YES" else "NO") println(Math.abs((a+1) - b)) }