from collections import defaultdict def div(n): S = set() i = 1 while i * i <= n: if n % i == 0: S.add(i) S.add(n // i) i += 1 return sorted(list(S)) N, M = map(int, input().split()) mod = 10 ** 9 + 7 L = div(M) pre = defaultdict(int) pre[1] = 1 for i in range(N): dp = defaultdict(int) for k in L: c = pre[k] % mod for nk in L: if k * nk > M: break if (M // k) % nk == 0: dp[nk] += c pre, dp = dp, pre ans = 0 for k, v in pre.items(): ans += v % mod print(ans % mod)