male,female = map(int,input().split()) male+=1 unpair = male - female result="YES" if unpair<=0 else "NO" print(result) print(abs(unpair))