import java.math.BigInteger; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int A = sc.nextInt(); final int B = sc.nextInt(); System.out.println((Math.abs(B) % Math.abs(A)) == 0 ? (B / A) : "NO"); } }