{"raw_statement":[{"iden":"statement","content":"Count 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 109 + 7.\n\n_gcd_ here means the [greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor)."},{"iden":"input","content":"The only line contains two positive integers _x_ and _y_ (1 ≤ _x_, _y_ ≤ 109)."},{"iden":"output","content":"Print the number of such sequences modulo 109 + 7."},{"iden":"examples","content":"Input\n\n3 9\n\nOutput\n\n3\n\nInput\n\n5 8\n\nOutput\n\n0"},{"iden":"note","content":"There are three suitable sequences in the first test: (3, 3, 3), (3, 6), (6, 3).\n\nThere are no suitable sequences in the second test."}],"translated_statement":[{"iden":"statement","content":"计算满足以下条件的正整数序列 #cf_span[a1, a2, ..., an] (#cf_span[1 ≤ ai]) 的不同个数：#cf_span[gcd(a1, a2, ..., an) = x] 且 #cf_span[lcm(a1, a2, ..., an) = y]。由于答案可能很大，请对 #cf_span[10^9 + 7] 取模输出。\n\n这里的 #cf_span[gcd] 表示最大公约数，#cf_span[lcm] 表示最小公倍数。\n\n输入仅一行，包含两个正整数 #cf_span[x] 和 #cf_span[y] (#cf_span[1 ≤ x, y ≤ 10^9])。\n\n请输出满足条件的序列个数对 #cf_span[10^9 + 7] 取模的结果。\n\n在第一个测试用例中，有三个符合条件的序列：#cf_span[(3, 3, 3)], #cf_span[(3, 6)], #cf_span[(6, 3)]。\n\n在第二个测试用例中，没有符合条件的序列。\n\n"},{"iden":"input","content":"输入仅一行，包含两个正整数 #cf_span[x] 和 #cf_span[y] (#cf_span[1 ≤ x, y ≤ 10^9])。"},{"iden":"output","content":"请输出满足条件的序列个数对 #cf_span[10^9 + 7] 取模的结果。"},{"iden":"examples","content":"输入\n3 9\n输出\n3\n\n输入\n5 8\n输出\n0"},{"iden":"note","content":"在第一个测试用例中，有三个符合条件的序列：#cf_span[(3, 3, 3)], #cf_span[(3, 6)], #cf_span[(6, 3)]。在第二个测试用例中，没有符合条件的序列。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ x, y \\in \\mathbb{Z}^+ $ be given integers.  \nLet $ n \\in \\mathbb{Z}^+ $ be the length of the sequence (variable).  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive integers with $ a_i \\in \\mathbb{Z}^+ $.\n\n**Constraints**  \n1. $ 1 \\le x, y \\le 10^9 $  \n2. $ \\gcd(a_1, a_2, \\dots, a_n) = x $  \n3. $ \\max(a_1, a_2, \\dots, a_n) = y $\n\n**Objective**  \nCount the number of finite sequences $ A $ of positive integers satisfying the above constraints, modulo $ 10^9 + 7 $.","simple_statement":null,"has_page_source":false}