import java.util.Scanner object Yuki780 { val sc = new Scanner(System.in) def main(args: Array[String]): Unit ={ val a = sc.nextInt val b = sc.nextInt println(if(b - (a + 1) >= 0) "YES" else "NO") println(Math.abs(b - (a + 1))) } }