// import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a>b?"YES":"NO"); System.out.println(Math.max(0, a-b+1)); } }