#include constexpr int INF = 2147483647; constexpr long long int INF_LL = 9223372036854775807; constexpr int MOD = 1000000007; using namespace std; typedef long long int ll; typedef unsigned long long int ull; int main(int argc, char *argv[]) { int A, B; cin >> A >> B; if (B > A) cout << "Yes" << endl; else cout << "No" << endl; cout << max(A + 1, B) - min(A + 1, B) << endl; return 0; }