a,b=map(int,input().split()) print('YNEOS'[b-a-1<0::2]) print(abs(a+1-b))