#include #define rep(i, n) for(long long i = 0; i < n; i ++) using namespace std; int main(){ int a, b; cin >> a >> b; a ++; if(a >= b) cout << "YES\n0" << endl; else cout << "NO\n" << a - b << endl; return 0; }