A, B = map(int, raw_input().split()) d = B - A if d > 0: print "YES" else: print "NO" print abs(d-1)