import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = Integer.parseInt(sc.next()) + 1; int f = Integer.parseInt(sc.next()); if(m >= f) { System.out.println("YES"); System.out.println(0); } else { System.out.println("NO"); System.out.println(m - f); } } }