const input = require('fs').readFileSync('/dev/stdin', 'utf8'); const [[A, B]] = input.split('\n').map(v => v.split(/\s/).map(v => Number(v))); console.log(Number.isInteger(B / A) ? B / A : 'NO');