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