import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No485 { public static void main(String[] args) { try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); int A = Integer.parseInt(str[0]); int B = Integer.parseInt(str[1]); if(B%A ==0) System.out.println(B/A); else System.out.println("NO"); }catch(IOException e){ e.getStackTrace(); }catch(NumberFormatException e){ e.getStackTrace(); } } }