{"raw_statement":[{"iden":"statement","content":"You are given a set of _n_ points on the plane. A line containing the origin is called good, if projection of the given set to this line forms a symmetric multiset of points. Find the total number of good lines.\n\nMultiset is a set where equal elements are allowed.\n\nMultiset is called symmetric, if there is a point _P_ on the plane such that the multiset is [centrally symmetric](https://en.wikipedia.org/wiki/Point_reflection) in respect of point _P_."},{"iden":"input","content":"The first line contains a single integer _n_ (1 ≤ _n_ ≤ 2000) — the number of points in the set.\n\nEach of the next _n_ lines contains two integers _x__i_ and _y__i_ ( - 106  ≤  _x__i_,  _y__i_  ≤  106) — the coordinates of the points. It is guaranteed that no two points coincide."},{"iden":"output","content":"If there are infinitely many good lines, print _\\-1_.\n\nOtherwise, print single integer — the number of good lines."},{"iden":"examples","content":"Input\n\n3\n1 2\n2 1\n3 3\n\nOutput\n\n3\n\nInput\n\n2\n4 3\n1 2\n\nOutput\n\n\\-1"},{"iden":"note","content":"Picture to the first sample test:\n\n![image](https://espresso.codeforces.com/eedc60313be8684bd6169b8b23f0f0afd92479a8.png)\n\nIn the second sample, any line containing the origin is good."}],"translated_statement":[{"iden":"statement","content":"给定平面上的一组 #cf_span[n] 个点。一条经过原点的直线被称为“好线”，如果将给定点集投影到这条直线上后，形成的点的多重集是对称的。求好线的总数。\n\n多重集是指允许重复元素的集合。\n\n一个多重集被称为对称的，如果存在平面上的一个点 #cf_span[P]，使得该多重集关于点 #cf_span[P] 中心对称。\n\n第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 2000]) —— 点集中的点数。\n\n接下来的 #cf_span[n] 行，每行包含两个整数 #cf_span[xi] 和 #cf_span[yi] (#cf_span[ - 106  ≤  xi,  yi  ≤  106]) —— 点的坐标。保证没有两个点重合。\n\n如果存在无穷多条好线，请输出 _-1_。\n\n否则，输出一个整数 —— 好线的数量。\n\n第一个样例的图示：\n\n \n\n在第二个样例中，任意一条经过原点的直线都是好线。"},{"iden":"input","content":"第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 2000]) —— 点集中的点数。接下来的 #cf_span[n] 行，每行包含两个整数 #cf_span[xi] 和 #cf_span[yi] (#cf_span[ - 106  ≤  xi,  yi  ≤  106]) —— 点的坐标。保证没有两个点重合。"},{"iden":"output","content":"如果存在无穷多条好线，请输出 _-1_。否则，输出一个整数 —— 好线的数量。"},{"iden":"examples","content":"输入\n3\n1 2\n2 1\n3 3\n输出\n3\n\n输入\n2\n4 3\n1 2\n输出\n-1"},{"iden":"note","content":"第一个样例的图示：在第二个样例中，任意一条经过原点的直线都是好线。"}],"sample_group":[],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}