#include using namespace std; void solve() { int a, b; cin >> a >> b; cout << ((a + 1 == b) ? "YES" : "NO") << endl; cout << a + 1 - b << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); getchar(); }