def scan; gets.split.map(&:to_i);end a,b = scan puts b%a==0 ? b/a : "NO"