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