No tag edit access

The problem statement has recently been changed. View the changes.

×
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-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/09/2021 01:31:21 (g1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|