{"problem":{"name":"193. Quadratic Equation Factoring","description":{"content":"You're given a quadratic equation, in the form of $y = a x^2 + b x + c$. Your task is to find all possible factorizations of this quadratic equation, using only positive integers. In other words, you ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269193"},"statements":[{"statement_type":"Markdown","content":"You're given a quadratic equation, in the form of $y = a x^2 + b x + c$. Your task is to find all possible factorizations of this quadratic equation, using only positive integers. In other words, you have to find all pairs of binomials $c x + d$, where $c$ and $c$ are both positive integers, such that the product of the two binomials is the original quadratic equation.\n\nSort the factorizations in ASCII order (you can use your language's built-in sorting method).\n\nThe only line of input contains three space-separated *positive* integers $a$, $b$, and $c$: the coefficient on the $x$ term of the quadratic equation, and the constant term of the quadratic equation, respectively.\n\nOutput all of the integer factorizations of the given quadratic equation, each on a new line. Each one should be in the format $(x + c 1) (x + c 2)$.\n\nIf there are no possible factorizations, output \"-1\" (no quotes).\n\n## Input\n\nThe only line of input contains three space-separated *positive* integers $a$, $b$, and $c$: the coefficient on the $x$ term of the quadratic equation, and the constant term of the quadratic equation, respectively.\n\n## Output\n\nOutput all of the integer factorizations of the given quadratic equation, each on a new line. Each one should be in the format $(x + c 1) (x + c 2)$.If there are no possible factorizations, output \"-1\" (no quotes).\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ a, b, c \\in \\mathbb{Z}^+ $ be the coefficients of the quadratic $ y = ax^2 + bx + c $.  \n\n**Constraints**  \n$ a, b, c \\geq 1 $  \n\n**Objective**  \nFind all pairs of positive integers $ (d, e) $ such that:  \n$$\nax^2 + bx + c = (px + q)(rx + s)\n$$  \nwhere $ p, q, r, s \\in \\mathbb{Z}^+ $, $ pr = a $, $ qs = c $, and $ ps + qr = b $.  \n\nFor each valid factorization, output in the form $ (x + q)(x + s) $ **only if** $ p = r = 1 $.  \nIf no such factorization exists with $ p = r = 1 $, output \"-1\".  \n\nSort all valid outputs in ASCII order.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269193","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}