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