import java.util.*; import java.lang.Math; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int A = sc.nextInt(); int B = sc.nextInt(); int p = A - B; if(A + 1 <= B){ System.out.println( "Yes" ); System.out.println( B - A -1 ); }else{ System.out.println( "No" ); System.out.println( A + 1 -B ); } } }