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-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/21/2019 09:36:56 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|