// import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt()+1; int b = sc.nextInt(); System.out.println(a<=b?"YES":"NO"); System.out.println(Math.abs(a-b)); } }