A, B = map(int, input().split()) if A < B: print("YES") else: print("NO") l = [A + 1, B] print(max(l) - min(l))