import strutils

proc nextString: string =
    result = ""
    while not endOfFile stdin:
        let c = readChar stdin
        if c == ' ' or c == "\n"[0]: return
        elif c != '\r': add result, c

proc nextInt: int =
    parseInt nextString()


var
    a, b = nextInt()

a += 1


while a > 0 and b > 0:
    a -= 1
    b -= 1

if a == 0:
    echo "YES"
    echo b
else:
    echo "NO"
    echo a