{"raw_statement":[{"iden":"problem statement","content":"You are given positive integers $N$ and $M$.  \nFind the smallest positive integer $X$ that satisfies both of the conditions below, or print $-1$ if there is no such integer.\n\n*   $X$ can be represented as the product of two integers $a$ and $b$ between $1$ and $N$, inclusive. Here, $a$ and $b$ may be the same.\n*   $X$ is at least $M$."},{"iden":"constraints","content":"*   $1\\leq N\\leq 10^{12}$\n*   $1\\leq M\\leq 10^{12}$\n*   $N$ and $M$ are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$"},{"iden":"sample input 1","content":"5 7"},{"iden":"sample output 1","content":"8\n\nFirst, $7$ cannot be represented as the product of two integers between $1$ and $5$.  \nSecond, $8$ can be represented as the product of two integers between $1$ and $5$, such as $8=2\\times 4$.\nThus, you should print $8$."},{"iden":"sample input 2","content":"2 5"},{"iden":"sample output 2","content":"\\-1\n\nSince $1\\times 1=1$, $1\\times 2=2$, $2\\times 1=2$, and $2\\times 2=4$, only $1$, $2$, and $4$ can be represented as the product of two integers between $1$ and $2$, so no number greater than or equal to $5$ can be represented as the product of two such integers.  \nThus, you should print $-1$."},{"iden":"sample input 3","content":"100000 10000000000"},{"iden":"sample output 3","content":"10000000000\n\nFor $a=b=100000$ $(=10^5)$, the product of $a$ and $b$ is $10000000000$ $(=10^{10})$, which is the answer.  \nNote that the answer may not fit into a $32$\\-bit integer type."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}