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