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