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