Quarantine Math

아직 제출이 없습니다시간 제한1.25초메모리 제한256 MB

문제

It’s quarantine and you’re so bored that you decided to dedicate some time to level up your math skills. Unfortunately, yesterday you bumped into a problem you couldn’t solve. However, you’ve dreamt of this problem for the entire night, so maybe today the luck will be on your side?

For given natural numbers nn, mm let S(n,m)S(n, m) be a set of positive integer numbers, such that for every element kk from this set, (nmodk)+(mmodk)k(n \bmod k) + (m \bmod k) \ge k, where amodba \bmod b – is the remainder of aa divided by bb.

The problem asks to compute the value of the next function: F(n,m)=_kS_(n,m)D(k)F(n, m) = \sum\_{k \in S\_{(n,m)}}{D(k)}, where D(x)D(x) - is the number of positive divisors of the number xx.

입력

Two natural numbers nn, mm. 1n,m1091 \le n, m \le 10^9.

출력

One number - value of a function F(n,m)F(n, m).

힌트

S(4,7)=5,8,9,10,11,D(5)=2,D(8)=4,D(9)=3,D(10)=4,D(11)=2S(4, 7) = 5, 8, 9, 10, 11, D(5) = 2, D(8) = 4, D(9) = 3, D(10) = 4, D(11) = 2