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