import java.util.Scanner; public class Main { public static void main(String[]args) { Scanner sc = new Scanner(System.in); int a,b = 0; a = sc.nextInt(); b = sc.nextInt(); a++; if(a == b) { System.out.println("YES"); a = a - b; System.out.println(a); }else if(b < a){ System.out.println("NO"); a = a - b; System.out.println(a); }else if(a < b) { System.out.println("NO"); b = b - a; System.out.println(b); } } }