A, B = [int(i) for i in input().strip().split(' ')] print(['YES', 'NO'][A >= B]) print(abs(B - (A + 1)))