Divisibility of Factors

Given two integers N and D, you will have to find how many of the factors of N! (factorial N) are divisible by D. Input The input file contains several lines of input. Each line contains two integers N (0 ≤ N ≤ 100) and D (0 < |D| ≤ 231 − 1). Input is terminated by a line containing two zeroes. This line should not be processed. Output For each line of input produce one line of output. This line contains a single integer, which denotes of many different factors of N! are divisible by D. Sample Input 10 2 93 00 Sample Output 240 128