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