🏡 index : github.com/captn3m0/codechef.git

---
{"category_name":"easy","problem_code":"MINLCM1","problem_name":"Min Max LCM","problemComponents":{"constraints":"- $1 \\leq T \\leq 10^5$\n- $1 \\leq X \\leq 10^8$\n- $2 \\leq K \\leq 10^8$\n- It is guaranteed that, for each test case, $X \\cdot K \\leq 10^9$ \n","constraintsState":true,"subtasks":"- 30 points : $1 \\leq R \\leq 10000$\n- 70 points : $1 \\leq R \\leq 10^9$\n","subtasksState":false,"inputFormat":"- First line will contain $T$, number of testcases. Then the testcases follow.\n- Each testcase contains of a single line of input, two space separated integers $X$ and $K$.\n","inputFormatState":true,"outputFormat":"For each testcase, output two space separated integers - the minimum and maximum possible value respectively of $LCM(i, j)$ where $X \\leq i \\lt j \\leq X \\cdot K$. \n","outputFormatState":true,"sampleTestCases":{"0":{"id":1,"input":"2\n4 3\n2 3","output":"8 132\n4 30","explanation":"**Test Case $1$:** We want to find the minimum and maximum value of $LCM(i, j)$ for $4 \\leq i \\lt j \\leq 12$.\nIt is easy to verify that the $LCM(4, 8) = 8$ is the minimum possible value whereas $LCM(11, 12) = 132$ is the maximum value. \n\n**Test Case $2$:** We want to find the minimum and maximum value of $LCM(i, j)$ for $2 \\leq i \\lt j \\leq 6$. The maximum value is obtained for the pair $(5, 6)$ whereas the minimum is obtained for the pair $(2, 4)$.","isDeleted":false}}},"video_editorial_url":"https://youtu.be/OX_E3COHw28","languages_supported":{"0":"CPP14","1":"C","2":"JAVA","3":"PYTH 3.6","4":"CPP17","5":"PYTH","6":"PYP3","7":"CS2","8":"ADA","9":"PYPY","10":"TEXT","11":"PAS fpc","12":"NODEJS","13":"RUBY","14":"PHP","15":"GO","16":"HASK","17":"TCL","18":"PERL","19":"SCALA","20":"LUA","21":"kotlin","22":"BASH","23":"JS","24":"LISP sbcl","25":"rust","26":"PAS gpc","27":"BF","28":"CLOJ","29":"R","30":"D","31":"CAML","32":"FORT","33":"ASM","34":"swift","35":"FS","36":"WSPC","37":"LISP clisp","38":"SQL","39":"SCM guile","40":"PERL6","41":"ERL","42":"CLPS","43":"ICK","44":"NICE","45":"PRLG","46":"ICON","47":"COB","48":"SCM chicken","49":"PIKE","50":"SCM qobi","51":"ST","52":"SQLQ","53":"NEM"},"max_timelimit":1,"source_sizelimit":50000,"problem_author":"ashishgup","problem_tester":"","date_added":"20-10-2021","tags":{"0":"ashishgup","1":"simple","2":"snck1a21"},"problem_difficulty_level":"Unavailable","best_tag":"","editorial_url":"https://discuss.codechef.com/problems/MINLCM1","time":{"view_start_date":1635003000,"submit_start_date":1635003000,"visible_start_date":1635003000,"end_date":1735669800},"is_direct_submittable":false,"problemDiscussURL":"https://discuss.codechef.com/search?q=MINLCM1","is_proctored":false,"visitedContests":{},"layout":"problem"}
---
### Read problem statements in [Mandarin Chinese](https://www.codechef.com/download/translated/SNCK1A21/mandarin/MINLCM1.pdf), [Russian](https://www.codechef.com/download/translated/SNCK1A21/russian/MINLCM1.pdf), and [Vietnamese](https://www.codechef.com/download/translated/SNCK1A21/vietnamese/MINLCM1.pdf) as well.

You are given two positive integers $X$ and $K$.

You have to output the minimum and maximum value of $LCM(i, j)$ where $X \leq i \lt j \leq X \cdot K$. 

We define $LCM(i, j)$ for two positive integers $i$ and $j$ as the minimum positive integer $y$ such that both $i$ and $j$ divide $y$ without remainder. 

<aside style='background: #f8f8f8;padding: 10px 15px;'><div>All submissions for this problem are available.</div></aside>