Least Common Multiple
Time limit2sMemory limit1024 MB
Given n and k, count the multisets of k positive integers whose least common multiple is exactly n, modulo 10^9+7.
- Level
Medium6 of 10
- Topics
- Number theory, Combinatorics, Math
- Solved
- No attempts yet
Problem
Vasya is a young programmer. He can already solve problems on graphs, data structures, combinatorics, and dynamic programming. He is not yet familiar with number theory, so he started attending lectures on it. At one of the first lectures he learned what the least common multiple is.
A multiset is a set in which elements may repeat.
The least common multiple of a multiset of positive integers is the smallest positive integer that is divisible by every element of .
After each lecture, the teacher assigns homework on the topics covered. This time the assignment was hard:
Given numbers $n$ and $k$, find the number of multisets of $k$ elements whose least common multiple is equal to $n$
For example, if and , the suitable multisets are , , , , and . So the answer is 5. Multisets that differ only in the order of their elements are considered the same.
Vasya understood the lecture very well and is clever, so he has already solved the problem. He is not sure that he did everything correctly. Vasya asks you to solve the same problem and check his answers on some tests. Since the answer may be very large, Vasya only needs the remainder of the answer modulo .
Input
The first line of the input contains the numbers () and (), separated by a space.
Output
Print one number: the answer modulo .