import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(b%a==0?b/a:"NO"); } }