#include typedef long long ll; const int INF = 1e9; const ll LINF = 1e18; const int MOD = 1e9+7; using namespace std; int main() { int a, b; if (a - 1 == b) { cout << "YES" << endl; } else { cout << "NO" << endl; cout << abs(a + 1 - b) << endl; } }