a, b = map(int, input().split()) a += 1 if a <= b: ans1 = "YES" else: ans1 = "NO" ans2 = abs(a - b) print(ans1) print(ans2)