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