#include using namespace std; int main() { int a, b; cin >> a >> b; a++; if (a <= b) { cout << "YES" << endl; cout << 0 << endl; } else { cout << "NO" << endl; cout << a - b << endl; } return 0; }