use std::io::Write; /* ----------------------------------------------- */ fn d(m: usize) -> Vec { let mut y = m; let mut v = Vec::::with_capacity(30); for x in 2..(m as f64).sqrt() as usize + 5 { let mut c = 0; while y % x == 0 { y /= x; c += 1; } v.push(c); } return v; } fn mul(a: &Vec>, b: &Vec>, md: i64) -> Vec> { let h = a.len(); let w = b[0].len(); let p = a[0].len(); let mut ret = vec![vec![0; w]; h]; for i in 0..h { for j in 0..w { for k in 0..p { ret[i][j] += (a[i][k] * b[k][j]) % md; if ret[i][j] >= md { ret[i][j] -= md; } } } } return ret; } fn dp(n: usize, x: usize, md: i64) -> i64 { let mut cor = vec![1; x + 1]; for _ in 0..n - 1 { let mut sum = cor.to_vec(); for i in 1..sum.len() { sum[i] += sum[i - 1]; sum[i] %= md; } for i in 0..sum.len() { cor[i] = sum[x - i]; } } return cor.iter().sum::() % md; } fn run(sc: &mut scanner::Scanner, out: &mut std::io::BufWriter) { let md: i64 = 1000000007; let n: usize = sc.next(); let m: usize = sc.next(); let size: usize = 40; let mut mat = vec![vec![0; size]; size]; for i in 0..size { for j in i..size { mat[i][j] = 1; } } let mut val = vec![vec![0; size]; size]; for i in 0..size { val[i][i] = 1; } /* let mut k = n; while k > 0 { if k & 1 == 1 { val = mul(&val, &mat, md); } mat = mul(&mat, &mat, md); k >>= 1; } println!("{:?}", val); let cor: Vec = val .into_iter() .reduce(|ac, it| ac.into_iter().zip(it).map(|(a, b)| (a + b) % md).collect()) .unwrap(); */ let v: Vec = (0..40).map(|x| dp(n, x, md)).collect(); let mut ans = 1; for x in d(m) { ans *= v[x]; ans %= md; } writeln!(out, "{}", ans).ok(); } /* ----------------------------------------------- */ #[allow(dead_code)] mod scanner { use std::str::FromStr; pub struct Scanner<'a> { it: std::str::SplitWhitespace<'a>, } impl<'a> Scanner<'a> { pub fn new(s: &'a String) -> Scanner<'a> { Scanner { it: s.split_whitespace(), } } pub fn next(&mut self) -> T { self.it.next().unwrap().parse::().ok().unwrap() } pub fn next_bytes(&mut self) -> Vec { self.it.next().unwrap().bytes().collect() } pub fn next_chars(&mut self) -> Vec { self.it.next().unwrap().chars().collect() } pub fn next_vec(&mut self, len: usize) -> Vec { (0..len).map(|_| self.next()).collect() } } } /* ----------------------------------------------- */ fn main() { use std::io::Read; let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); let mut sc = scanner::Scanner::new(&s); let out = std::io::stdout(); let mut out = std::io::BufWriter::new(out.lock()); run(&mut sc, &mut out); } /* ----------------------------------------------- */