local a, b = io.read("*n", "*n") local c = 0 for i = 1, 100000 do if a % i == 0 then local j = math.floor(a / i) if i < j then if i % b == 0 then c = c + 1 end if j % b == 0 then c = c + 1 end elseif i == j then if i % b == 0 then c = c + 1 end end end end print(c)