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