Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years.
×

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

D. Unusual Sequences

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputCount 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 . 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.

Examples

Input

3 9

Output

3

Input

5 8

Output

0

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.

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/22/2020 07:39:55 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|