{"problem":{"name":"B. Arpa and an exam about geometry","description":{"content":"Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points _a_, _b_, _c_. Find a point and an angle such that if we rotate the page around the point by the angl","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF851B"},"statements":[{"statement_type":"Markdown","content":"Arpa is taking a geometry exam. Here is the last problem of the exam.\n\nYou are given three points _a_, _b_, _c_.\n\nFind a point and an angle such that if we rotate the page around the point by the angle, the new position of _a_ is the same as the old position of _b_, and the new position of _b_ is the same as the old position of _c_.\n\nArpa is doubting if the problem has a solution or not (i.e. if there exists a point and an angle satisfying the condition). Help Arpa determine if the question has a solution or not.\n\n## Input\n\nThe only line contains six integers _a__x_, _a__y_, _b__x_, _b__y_, _c__x_, _c__y_ (|_a__x_|, |_a__y_|, |_b__x_|, |_b__y_|, |_c__x_|, |_c__y_| ≤ 109). It's guaranteed that the points are distinct.\n\n## Output\n\nPrint \"_Yes_\" if the problem has a solution, \"_No_\" otherwise.\n\nYou can print each letter in any case (upper or lower).\n\n[samples]\n\n## Note\n\nIn the first sample test, rotate the page around (0.5, 0.5) by .\n\nIn the second sample test, you can't find any solution.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Arpa 正在参加一场几何考试。这是考试的最后一道题。\n\n给你三个点 #cf_span[a, b, c]。\n\n请找出一个点和一个角度，使得将纸张绕该点旋转该角度后，#cf_span[a] 的新位置与 #cf_span[b] 的原位置相同，且 #cf_span[b] 的新位置与 #cf_span[c] 的原位置相同。\n\nArpa 怀疑这个问题是否有解（即是否存在满足条件的点和角度）。请帮助 Arpa 判断该问题是否有解。\n\n输入仅一行，包含六个整数 #cf_span[ax, ay, bx, by, cx, cy]（#cf_span[|ax|, |ay|, |bx|, |by|, |cx|, |cy| ≤ 10^9]）。保证这三个点互不相同。\n\n如果问题有解，请输出 \"_Yes_\"，否则输出 \"_No_\"。\n\n你可以以任意大小写形式输出每个字母。\n\n在第一个样例中，将纸张绕 #cf_span[(0.5, 0.5)] 旋转 。\n\n在第二个样例中，你无法找到任何解。\n\n## Input\n\n输入仅一行，包含六个整数 #cf_span[ax, ay, bx, by, cx, cy]（#cf_span[|ax|, |ay|, |bx|, |by|, |cx|, |cy| ≤ 10^9]）。保证这三个点互不相同。\n\n## Output\n\n如果问题有解，请输出 \"_Yes_\"，否则输出 \"_No_\"。你可以以任意大小写形式输出每个字母。\n\n[samples]\n\n## Note\n\n在第一个样例中，将纸张绕 #cf_span[(0.5, 0.5)] 旋转 。在第二个样例中，你无法找到任何解。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ A = (a_x, a_y) $, $ B = (b_x, b_y) $, $ C = (c_x, c_y) \\in \\mathbb{R}^2 $ be three distinct points.\n\n**Constraints**  \n$ |a_x|, |a_y|, |b_x|, |b_y|, |c_x|, |c_y| \\leq 10^9 $, and $ A \\neq B \\neq C \\neq A $.\n\n**Objective**  \nDetermine whether there exists a point $ P \\in \\mathbb{R}^2 $ and an angle $ \\theta \\in \\mathbb{R} $ such that a rotation about $ P $ by $ \\theta $ maps:  \n- $ A \\mapsto B $,  \n- $ B \\mapsto C $.  \n\n**Condition for Solution**  \nSuch a rotation exists if and only if:  \n$$\n|A - B| = |B - C| \\quad \\text{and} \\quad A, B, C \\text{ are not collinear}.\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF851B","tags":["geometry","math"],"sample_group":[["0 1 1 1 1 0","Yes"],["1 1 0 0 1000 1000","No"]],"created_at":"2026-03-03 11:00:39"}}