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