GCD and LCM
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given two positive integers A
and B
. Find the number of pairs of numbers (P, Q)
, which for them is A
- GCD(P, Q)
, and B
- LCM(P, Q)
.
Input
In a single line two positive integers A
and B
(A < 10^5
, B ≤ 10^6
).
Output
Single number - the required number of pairs.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 32%