304721: CF900D. Unusual Sequences

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:1 Solved:0

Description

Unusual Sequences

题意翻译

输入x,y,求有多少个数列满足其gcd为x,和为y。

题目描述

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 ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF900D/b6b0405f12ef386aeb195f818cd0534bcf4623e0.png). As this number could be large, print the answer modulo $ 10^{9}+7 $ . $ gcd $ here means the [greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor).

输入输出格式

输入格式


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

输出格式


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

输入输出样例

输入样例 #1

3 9

输出样例 #1

3

输入样例 #2

5 8

输出样例 #2

0

说明

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

题意翻译

输入x,y,求有多少个数列满足其gcd为x,和为y。

加入题单

上一题 下一题 算法标签: