def main(): A, B = map(int, input().split()) if A >= B: print("NO") else: print("YES") print(abs(A + 1 - B)) if __name__ == "__main__": main()