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