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