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