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