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