{"problem":{"name":"C. Line","description":{"content":"A line on the plane is described by an equation _Ax_ + _By_ + _C_ = 0. You are to find any point on this line, whose coordinates are integer numbers from  - 5·1018 to 5·1018 inclusive, or to find out ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF7C"},"statements":[{"statement_type":"Markdown","content":"A line on the plane is described by an equation _Ax_ + _By_ + _C_ = 0. You are to find any point on this line, whose coordinates are integer numbers from  - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist.\n\n## Input\n\nThe first line contains three integers _A_, _B_ and _C_ ( - 2·109 ≤ _A_, _B_, _C_ ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that _A_2 + _B_2 > 0.\n\n## Output\n\nIf the required point exists, output its coordinates, otherwise output _\\-1_.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"平面上的一条直线由方程 $Ax + By + C = 0$ 描述。你需要找到该直线上任意一个坐标为整数且在 $ - 5·10^{18}$ 到 $5·10^{18}$（含）之间的点，或者确定这样的点不存在。\n\n第一行包含三个整数 $A$、$B$ 和 $C$（$ - 2·10^9 ≤ A, B, C ≤ 2·10^9$）——直线方程的对应系数。保证 $A^2 + B^2 > 0$。\n\n如果存在所需的点，请输出其坐标；否则输出 _-1_。\n\n## Input\n\n第一行包含三个整数 $A$、$B$ 和 $C$（$ - 2·10^9 ≤ A, B, C ≤ 2·10^9$）——直线方程的对应系数。保证 $A^2 + B^2 > 0$。\n\n## Output\n\n如果存在所需的点，请输出其坐标；否则输出 _-1_。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ A, B, C \\in \\mathbb{Z} $ be coefficients of the line equation $ Ax + By + C = 0 $, with $ A^2 + B^2 > 0 $.\n\n**Constraints**  \n$ -2 \\cdot 10^9 \\leq A, B, C \\leq 2 \\cdot 10^9 $\n\n**Objective**  \nFind integers $ x, y \\in \\mathbb{Z} $ such that:  \n$$\nAx + By + C = 0 \\quad \\text{and} \\quad -5 \\cdot 10^{18} \\leq x, y \\leq 5 \\cdot 10^{18}\n$$  \nIf no such integers exist, output $-1$.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF7C","tags":["math","number theory"],"sample_group":[["2 5 3","6 -3"]],"created_at":"2026-03-03 11:00:39"}}