boy,girl=map(int,input().split()) boy=boy+1 if girl-boy>=0: print("YES") print(girl-boy) elif girl-boy<0: print("NO") print(boy-girl)