A,B=map(int,input().split()) if A+1<=B:S="YES" else:S="NO" print(S,abs(A+1-B),sep="\n")