#include using namespace std; int main() { int A, B; cin >> A >> B; if (A < B) cout << "YES" << endl << B - A - 1; else cout << "NO" << endl << A - B + 1; }