#include int main() { int A, B; std::cin >> A >> B; if (A + 1 <= B) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << std::endl; } std::cout << std::max(0, A + 1 - B) << std::endl; return 0; }