#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int n, m; cin >> n >> m; if (n < m){ cout << "YES" << endl; cout << m-n-1 << endl; } else{ cout << "NO" << endl; cout << n-m+1 << endl; } return 0; }