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