package yukicoder; import java.util.Scanner; public class Q485 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int sig = (int) Math.signum(A * B); A = Math.abs(A); B = Math.abs(B); for (int i = 0; i < 1000; ++i) { if (A * i == B) { System.out.println(i*sig); return; } } System.out.println("NO"); } }