/* No.780 オフ会 https://yukicoder.me/problems/no/780 */ #include using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int a, b; cin >> a >> b; if (a + 1 <= b) { cout << "YES" << endl; cout << (b - a - 1) << endl; } else { cout << "NO" << endl; cout << (a - b + 1) << endl; } }