A, B = map(int, input().split()) A += 1 print(['NO', 'YES'][A <= B]) print(abs(A-B))