import java.io.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); String[] num=str.split(" "); int a=Integer.parseInt(num[0]); int b=Integer.parseInt(num[1]); if(b%a!=0) System.out.println("NO"); else System.out.println(b/a); } }