#include using namespace std; using int64 = long long; int main() { int A, B; cin >> A >> B; ++A; if(A >= B) cout << "YES\n"; else cout << "NO\n"; cout << abs(A - B) << endl; }