/* 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 << 0 << endl; } else { cout << "NO" << endl; cout << (abs(a - b) + 1) << endl; } }