x,y = map(int,input().split()) x += 1 if x<=y: print("YES") else: print("NO") print(max(x,y)-min(x,y))