#include #include #include #include #include #define all(x) x.begin(),x.end() #define pb push_back #define ll long long using namespace std; int main() { int a,b,ans; cin >> a>>b; if (a >= b) { ans = a - b+1; cout << "NO" << endl; cout << ans << endl; } else { ans = b - (a + 1); cout << "YES" << endl; cout << ans << endl; } return 0; }