a,b = map(int,input().split()) ans = "NO" if a+1 <= b: ans = "YES" print(ans) print(abs(a+1-b))