Codeforces Round 450 (Div. 2)
D
Unusual Sequences
Codeforces
2000
原题
← CE →
翻译中…

Count the number of distinct sequences $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$ ($1 ≤ *a*_{*i*}$) consisting of positive integers such that $*gcd*(*a*_{1}, *a*_{2}, ..., *a*_{*n*}) = *x*$ and image. As this number could be large, print the answer modulo $10^{9} + 7$.

翻译中…

$*gcd*$ here means the greatest common divisor.

翻译中…

Input

翻译中…

The only line contains two positive integers $*x*$ and $*y*$ ($1 ≤ *x*, *y* ≤ 10^{9}$).

翻译中…

Output

翻译中…

Print the number of such sequences modulo $10^{9} + 7$.

翻译中…

Note

翻译中…

There are three suitable sequences in the first test: $(3, 3, 3)$, $(3, 6)$, $(6, 3)$.

翻译中…

There are no suitable sequences in the second test.

翻译中…

样例

Input #1
3 9
Output #1
3
InputCopy OutputCopy
Input #2
5 8
Output #2
0
InputCopy OutputCopy
题目信息
题号
900D
时间限制
1 s
内存限制
256 MB
标签
位运算
组合数学
动态规划
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。