#include using namespace std; int main() { int a,b,sum; cin >> a >> b; sum = b-a; if(0 < sum){ cout << "YES" << endl << sum-1 << endl; } else { cout << "NO" << endl << abs(sum)+1 << endl; } return 0; }