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