#include "bits/stdc++.h" using namespace std; int main() { int A, B; cin >> A >> B; A++; if (A <= B) cout << "YES"; else cout << "NO"; cout << endl << abs(A - B) << endl; }