a,b = map(int,input().split()) a += 1 if a>b: print('NO') else: print('Yes') print(abs(a-b))