#include using namespace std; int main(){ int a,b;cin>>a>>b; cout << (b - a > 0 ? "YES" : "NO") << endl << abs((a + 1) - b) << endl; }