const input = require('fs').readFileSync('/dev/stdin', 'utf8'); const [A, B] = input.split(/\s/).map(v => +v); const remain = Math.abs((A + 1) - B); console.log(remain ? `NO\n${remain}` : 'YES\n0');