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