A,B = map(int,input().split()) if A >= B: print('NO') else: print('YES') ans = abs(A + 1 - B) print(ans)