#include using namespace std; static const int INF = 1e9 + 7; template using Vec = vector; template using P = pair; template using Tup = tuple; template using qp = priority_queue, greater >; template using pq = priority_queue; using llong = long long; using ullong = unsigned long long; using uint = unsigned int; template T gcd(T x, T y) { return y ? gcd(y, x % y) : x; } void hawawa() { int a, b; cin >> a >> b; if (a < b) { cout << "YES\n"; } else { cout << "NO\n"; } cout << abs(a + 1 - b) << "\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); hawawa(); }