A,B=map(int,input().split()) print("YES" if A < B else "NO") print(abs(A + 1 - B))