{"raw_statement":[{"iden":"statement","content":"_Connect the countless points with lines, till we reach the faraway yonder._\n\nThere are _n_ points on a coordinate plane, the _i_\\-th of which being (_i_, _y__i_).\n\nDetermine whether it's possible to draw two parallel and non-overlapping lines, such that every point in the set lies on **exactly one** of them, and each of them passes through **at least one** point in the set."},{"iden":"input","content":"The first line of input contains a positive integer _n_ (3 ≤ _n_ ≤ 1 000) — the number of points.\n\nThe second line contains _n_ space-separated integers _y_1, _y_2, ..., _y__n_ ( - 109 ≤ _y__i_ ≤ 109) — the vertical coordinates of each point."},{"iden":"output","content":"Output \"_Yes_\" (without quotes) if it's possible to fulfill the requirements, and \"_No_\" otherwise.\n\nYou can print each letter in any case (upper or lower)."},{"iden":"examples","content":"Input\n\n5\n7 5 8 6 9\n\nOutput\n\nYes\n\nInput\n\n5\n-1 -2 0 0 -5\n\nOutput\n\nNo\n\nInput\n\n5\n5 4 3 2 1\n\nOutput\n\nNo\n\nInput\n\n5\n1000000000 0 0 0 0\n\nOutput\n\nYes"},{"iden":"note","content":"In the first example, there are five points: (1, 7), (2, 5), (3, 8), (4, 6) and (5, 9). It's possible to draw a line that passes through points 1, 3, 5, and another one that passes through points 2, 4 and is parallel to the first one.\n\nIn the second example, while it's possible to draw two lines that cover all points, they cannot be made parallel.\n\nIn the third example, it's impossible to satisfy both requirements at the same time."}],"translated_statement":[{"iden":"statement","content":"_Connect the countless points with lines, till we reach the faraway yonder._\n\nThere are #cf_span[n] points on a coordinate plane, the #cf_span[i]-th of which being #cf_span[(i, yi)].\n\nDetermine whether it's possible to draw two parallel and non-overlapping lines, such that every point in the set lies on *exactly one* of them, and each of them passes through *at least one* point in the set.\n\nThe first line of input contains a positive integer #cf_span[n] (#cf_span[3 ≤ n ≤ 1 000]) — the number of points.\n\nThe second line contains #cf_span[n] space-separated integers #cf_span[y1, y2, ..., yn] (#cf_span[ - 109 ≤ yi ≤ 109]) — the vertical coordinates of each point.\n\nOutput \"_Yes_\" (without quotes) if it's possible to fulfill the requirements, and \"_No_\" otherwise.\n\nYou can print each letter in any case (upper or lower).\n\nIn the first example, there are five points: #cf_span[(1, 7)], #cf_span[(2, 5)], #cf_span[(3, 8)], #cf_span[(4, 6)] and #cf_span[(5, 9)]. It's possible to draw a line that passes through points #cf_span[1, 3, 5], and another one that passes through points #cf_span[2, 4] and is parallel to the first one.\n\nIn the second example, while it's possible to draw two lines that cover all points, they cannot be made parallel.\n\nIn the third example, it's impossible to satisfy both requirements at the same time.\n\n"},{"iden":"input","content":"The first line of input contains a positive integer #cf_span[n] (#cf_span[3 ≤ n ≤ 1 000]) — the number of points.The second line contains #cf_span[n] space-separated integers #cf_span[y1, y2, ..., yn] (#cf_span[ - 109 ≤ yi ≤ 109]) — the vertical coordinates of each point."},{"iden":"output","content":"Output \"_Yes_\" (without quotes) if it's possible to fulfill the requirements, and \"_No_\" otherwise.You can print each letter in any case (upper or lower)."},{"iden":"examples","content":"输入\n5\n7 5 8 6 9\n输出\nYes\n输入\n5\n-1 -2 0 0 -5\n输出\nNo\n输入\n5\n5 4 3 2 1\n输出\nNo\n输入\n5\n1000000000 0 0 0 0\n输出\nYes"},{"iden":"note","content":"在第一个例子中，有五个点：#cf_span[(1, 7)], #cf_span[(2, 5)], #cf_span[(3, 8)], #cf_span[(4, 6)] 和 #cf_span[(5, 9)]。可以画一条经过点 #cf_span[1, 3, 5] 的直线，另一条经过点 #cf_span[2, 4] 且与第一条直线平行的直线。\n\n在第二个例子中，虽然可以画出两条覆盖所有点的直线，但它们无法变得平行。\n\n在第三个例子中，不可能同时满足两个要求。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $, $ n \\geq 3 $, be the number of points.  \nLet $ P = \\{ (i, y_i) \\mid i \\in \\{1, 2, \\dots, n\\} \\} $ be the set of points on the coordinate plane, where $ y_i \\in \\mathbb{Z} $ and $ |y_i| \\leq 10^9 $.\n\n**Constraints**  \n1. $ 3 \\leq n \\leq 1000 $  \n2. $ -10^9 \\leq y_i \\leq 10^9 $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nDetermine whether there exist two distinct, parallel, non-overlapping lines $ \\ell_1 $ and $ \\ell_2 $, both with the same slope $ m \\in \\mathbb{R} $, such that:  \n- $ P \\subseteq \\ell_1 \\cup \\ell_2 $,  \n- $ \\ell_1 \\cap \\ell_2 = \\emptyset $,  \n- $ P \\cap \\ell_1 \\neq \\emptyset $ and $ P \\cap \\ell_2 \\neq \\emptyset $,  \n- Each point in $ P $ lies on exactly one of $ \\ell_1 $ or $ \\ell_2 $.\n\nEquivalently, determine whether the set $ P $ can be partitioned into two nonempty subsets $ P_1 $ and $ P_2 $, such that all points in $ P_1 $ lie on a line of slope $ m $, all points in $ P_2 $ lie on a parallel line of slope $ m $, and the two lines are distinct.","simple_statement":null,"has_page_source":false}