N, K = map(int, input().split()) N -= K ans = 0 for i in range(1, int(N ** 0.5) + 1): if N % i == 0: if i <= K and N // i > K and N != i * i: ans += 1 elif N // i > K and N != i * i: ans += 2 elif i * i == N: ans += 1 print(ans)