a = input().split(' ') b = int(a[0]) + 1 c = int(a[1]) if b <= c: print('YES') print(c-b) else: print('NO') print(b-c)