{"raw_statement":[{"iden":"statement","content":"You are given two integers _n_ and _k_. Find _k_\\-th smallest divisor of _n_, or report that it doesn't exist.\n\nDivisor of _n_ is any such natural number, that _n_ can be divided by it without remainder."},{"iden":"input","content":"The first line contains two integers _n_ and _k_ (1 ≤ _n_ ≤ 1015, 1 ≤ _k_ ≤ 109)."},{"iden":"output","content":"If _n_ has less than _k_ divisors, output _\\-1_.\n\nOtherwise, output the _k_\\-th smallest divisor of _n_."},{"iden":"examples","content":"Input\n\n4 2\n\nOutput\n\n2\n\nInput\n\n5 3\n\nOutput\n\n\\-1\n\nInput\n\n12 5\n\nOutput\n\n6"},{"iden":"note","content":"In the first example, number 4 has three divisors: 1, 2 and 4. The second one is 2.\n\nIn the second example, number 5 has only two divisors: 1 and 5. The third divisor doesn't exist, so the answer is _\\-1_."}],"translated_statement":[{"iden":"statement","content":"给定两个整数 $n$ 和 $k$。求 $n$ 的第 $k$ 小的约数，若不存在则报告。\n\n$n$ 的约数是指任何自然数，使得 $n$ 能被其整除而无余数。\n\n第一行包含两个整数 $n$ 和 $k$（$1 ≤ n ≤ 10^{15}$，$1 ≤ k ≤ 10^9$）。\n\n如果 $n$ 的约数个数少于 $k$ 个，请输出 _-1_。\n\n否则，输出 $n$ 的第 $k$ 小的约数。\n\n在第一个例子中，数字 $4$ 有三个约数：$1$、$2$ 和 $4$。第二个是 $2$。\n\n在第二个例子中，数字 $5$ 只有两个约数：$1$ 和 $5$。第三个约数不存在，因此答案为 _-1_。\n\n"},{"iden":"input","content":"第一行包含两个整数 $n$ 和 $k$（$1 ≤ n ≤ 10^{15}$，$1 ≤ k ≤ 10^9$）。"},{"iden":"output","content":"如果 $n$ 的约数个数少于 $k$ 个，请输出 _-1_。否则，输出 $n$ 的第 $k$ 小的约数。"},{"iden":"examples","content":"输入\n4 2\n输出\n2\n输入\n5 3\n输出\n-1\n输入\n12 5\n输出\n6"},{"iden":"note","content":"在第一个例子中，数字 $4$ 有三个约数：$1$、$2$ 和 $4$。第二个是 $2$。在第二个例子中，数字 $5$ 只有两个约数：$1$ 和 $5$。第三个约数不存在，因此答案为 _-1_。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ with $ 1 \\leq n \\leq 10^{15} $.  \nLet $ D(n) = \\{ d \\in \\mathbb{Z}^+ \\mid d \\mid n \\} $ be the set of positive divisors of $ n $, ordered increasingly: $ d_1 < d_2 < \\dots < d_{\\tau(n)} $, where $ \\tau(n) = |D(n)| $.  \nLet $ k \\in \\mathbb{Z}^+ $ with $ 1 \\leq k \\leq 10^9 $.\n\n**Constraints**  \n$ 1 \\leq n \\leq 10^{15} $,  \n$ 1 \\leq k \\leq 10^9 $.\n\n**Objective**  \nIf $ k > \\tau(n) $, output $ -1 $.  \nOtherwise, output $ d_k $, the $ k $-th smallest positive divisor of $ n $.","simple_statement":null,"has_page_source":false}