output_description: Print the number of the sequences consisting of positive integers that satisfy
  the condition, modulo 10^9 + 7.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
attempt: #include <bits/stdc++.h>
  #define REP(i,n) for(int i=0;i<(n);++i)
  #define REPI(i,f,n) for(int i=(f);i<(n);++i)
  using namespace std;
  typedef long long ll;
  
  const int MAX = 210000;
  const int MOD = 1000000007;
  
  long long fac[MAX], finv[MAX], inv[MAX];
  
  // テーブルを作る前処理
  void COMinit() {
      fac[0] = fac[1] = 1;
      finv[0] = finv[1] = 1;
      inv[1] = 1;
      for (int i = 2; i < MAX; i++){
          fac[i] = fac[i - 1] * i % MOD;
          inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
          finv[i] = finv[i - 1] * inv[i] % MOD;
      }
  }
  
  // 二項係数計算
  long long COM(int n, int k){
      if (n < k) return 0;
      if (n < 0 || k < 0) return 0;
      return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
  }
  
  vector< ll > frac;
  
  int main() {
    // 前処理
    COMinit();
  
    ll N,M;
    cin >> N >> M;
    // Mの素因数分解
    ll mm = M;
    for (ll i=2; i*i<=mm; ++i ) {
      ll cnt = 0;
      while ( mm % i == 0 ) {
        cnt++;
        mm /= i;
      }
      if (cnt != 0) frac.emplace_back( cnt );
    }
    if (mm !=1 )  frac.emplace_back( 1 );
    ll ans = 1;
    for ( auto x : frac ) {
      ans = (ans * COM( x + N-1, x )) % MOD;
    }
    cout << (ans%MOD) << endl;
  }
  
  
problem_description: Statement
  
  You are given positive integers N and M.
  
  How many sequences a of length N consisting of positive integers satisfy a_1
  \times a_2 \times ... \times a_N = M? Find the count modulo 10^9+7.
  
  Here, two sequences a' and a'' are considered different when there exists some
  i such that a_i' \neq a_i''.
samples: [{"input": "2 6", "output": "4\n    \n\nFour sequences satisfy the condition: \\\\{a_1, a_2\\\\} = \\\\{1, 6\\\\}, \\\\{2, 3\\\\},\n\\\\{3, 2\\\\} and \\\\{6, 1\\\\}.\n\n* * *"}, {"input": "3 12", "output": "18\n    \n\n* * *"}, {"input": "100000 1000000000", "output": "957870001"}]