#include using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; i++) #define FOR(n) for(int i = 0; i < (int)n; i++) #define repi(i,a,b) for(int i = (int)a; i < (int)b; i++) #define pb push_back #define m0(x) memset(x,0,sizeof(x)) #define fill(x,y) memset(x,y,sizeof(x)) #define bg begin() #define ed end() #define all(x) x.bg,x.ed //#define mp make_pair #define vi vector #define vvi vector #define vll vector #define vvll vector #define vs vector #define vvs vector #define vc vector #define vvc vector #define pii pair #define pllll pair #define vpii vector> #define vpllll vector> #define vpis vector> #define vplls vector> #define vpsi vector> #define vpsll vector> template void chmax(T &a, const T &b) {a = (a > b? a : b);} template void chmin(T &a, const T &b) {a = (a < b? a : b);} using ll = long long; using ld = long double; using ull = unsigned long long; const ll INF = numeric_limits::max() / 2; const ld pi = 3.1415926535897932384626433832795028; const ll mod = 1e9 + 7; int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1}; int dy[] = {0, -1, 0, 1, -1, 1, -1, 1}; #define int long long template struct RSQ_RAQ { const T e = 0; const T zero = 0; vector dat, lazy; int n; function fx = [](T x, T y) {return (x + y) % mod;}; RSQ_RAQ(int n_) : n(), dat(4*n_, e), lazy(4*n_, zero) { int x = 1; while(x < n_) x *= 2; n = x; } void evaluate(int length, int k) { if(lazy[k] == zero) return; if(k <= n - 2) { (lazy[k * 2 + 1] += lazy[k]) %= mod; (lazy[k * 2 + 2] += lazy[k]) %= mod; } (dat[k] += lazy[k] * length % mod) %= mod; lazy[k] = zero; } void add(int a, int b, T x) { return add_sub(a, b, x, 0, 0, n); } void add_sub(int a, int b, T x, int k, int l, int r) { evaluate(r - l, k); if(a <= l && r <= b) { (lazy[k] += x) %= mod; evaluate(r - l, k); }else if(a < r && l < b) { add_sub(a, b, x, k * 2 + 1, l, (l + r) / 2); add_sub(a, b, x, k * 2 + 2, (l + r) / 2, r); dat[k] = fx(dat[k * 2 + 1], dat[k * 2 + 2]); } } T query(int a, int b) { return query_sub(a, b, 0, 0, n); } T query_sub(int a, int b, int k, int l, int r) { evaluate(r - l, k); if(r <= a || b <= l) { return e; }else if(a <= l && r <= b) { return dat[k]; }else { T vl = query_sub(a, b, k * 2 + 1, l, (l + r) / 2); T vr = query_sub(a, b, k * 2 + 2, (l + r) / 2, r); return fx(vl, vr); } } }; vector quotients(const int n) { vector ret; for(int i = 1; i * i <= n; i++) { if(n%i != 0) continue; ret.push_back(i); if(i * i != n) ret.push_back(n / i); } sort(all(ret)); return ret; } void solve() { int n, m; cin >> n >> m; vi quots = quotients(m); //a[i]*a[i+1]がmを超えないような数列の数 int sz = quots.size(); RSQ_RAQ tree(sz); FOR(sz) tree.add(i, i+1, 1); FOR(n-1) { RSQ_RAQ ntree(sz); int id = 0; for(auto e : quots) { ntree.add(id, id+1, tree.query(0LL, (int)(upper_bound(all(quots), m/e) - quots.begin()))); id++; } FOR(sz) tree.add(i, i+1, (ntree.query(i, i+1) - tree.query(i, i+1)) % mod); } cout << (tree.query(0, sz) % mod + mod) % mod << endl; } signed main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }