100 atcoder#ABC110D. [ABC110D] Factorization

[ABC110D] Factorization

Score : 400400 points

Problem Statement

You are given positive integers NN and MM.

How many sequences aa of length NN consisting of positive integers satisfy a1×a2×...×aN=Ma_1 \times a_2 \times ... \times a_N = M? Find the count modulo 109+710^9+7.

Here, two sequences aa' and aa'' are considered different when there exists some ii such that aiaia_i' \neq a_i''.

Constraints

  • All values in input are integers.
  • 1N1051 \leq N \leq 10^5
  • 1M1091 \leq M \leq 10^9

Input

Input is given from Standard Input in the following format:

NN MM

Output

Print the number of the sequences consisting of positive integers that satisfy the condition, modulo 109+710^9 + 7.

2 6
4

Four sequences satisfy the condition: {a1,a2}={1,6},{2,3},{3,2}\{a_1, a_2\} = \{1, 6\}, \{2, 3\}, \{3, 2\} and {6,1}\{6, 1\}.

3 12
18
100000 1000000000
957870001