#include #define rep(i,n) for(int i=0;i ; const ll INF = 1e18; const int MOD = 1000000007; int main(){ int a,b; cin >> a >> b; if(a < b){ cout << "YES" << endl; cout << b-a-1 << endl; return 0; }else{ cout << "NO" << endl; cout << a+1-b << endl; return 0; } return 0; }