a,b = map(int, input().split()) print("YNEOS"[a>=b::2]) print(abs(a+1-b))