#include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int A, B; cin >> A >> B; ++A; if (A <= B){ cout << "YES\n"; }else{ cout << "NO\n"; } cout << abs(A - B) << endl; return 0; }