#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using Pll = pair; using Pii = pair; constexpr ll MOD = 1000000007; constexpr long double EPS = 1e-10; constexpr int dyx[4][2] = { { 0, 1}, {-1, 0}, {0,-1}, {1, 0} }; ll sum_comb(ll s, ll k) { if(k >= s-1) return s-1; if(k+k < s) return 0; return k - (s-k) + 1; } int main() { std::ios::sync_with_stdio(false); cin.tie(0); ll n, k, ans = 0; cin >> n >> k; for(ll i=2;i*i<=k&&i!=k;++i) { // (a+c) if(k % i != 0) continue; ll j = k / i; // (b+d) if(j == 1 || j == k) continue; ans += (i*i == k?1:2) * sum_comb(i, n) * sum_comb(j, n); } cout << ans << endl; }