import java.util.Scanner; public class no780 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int A = sc.nextInt(); final int B = sc.nextInt(); final int YASUO = A + 1; if (YASUO <= B) { System.out.println("YES"); } else { System.out.println("NO"); } System.out.println("" + Math.abs(YASUO - B)); } }