{"problem":{"name":"F. Symmetric Projections","description":{"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 ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF886F"},"statements":[{"statement_type":"Markdown","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_.\n\n## Input\n\nThe 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.\n\n## Output\n\nIf there are infinitely many good lines, print _\\-1_.\n\nOtherwise, print single integer — the number of good lines.\n\n[samples]\n\n## Note\n\nPicture 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.","is_translate":false,"language":"English"},{"statement_type":"Markdown","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在第二个样例中，任意一条经过原点的直线都是好线。\n\n## Input\n\n第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 2000]) —— 点集中的点数。接下来的 #cf_span[n] 行，每行包含两个整数 #cf_span[xi] 和 #cf_span[yi] (#cf_span[ - 106  ≤  xi,  yi  ≤  106]) —— 点的坐标。保证没有两个点重合。\n\n## Output\n\n如果存在无穷多条好线，请输出 _-1_。否则，输出一个整数 —— 好线的数量。\n\n[samples]\n\n## Note\n\n第一个样例的图示：在第二个样例中，任意一条经过原点的直线都是好线。","is_translate":true,"language":"Chinese"}],"meta":{"iden":"CF886F","tags":["geometry"],"sample_group":[["3\n1 2\n2 1\n3 3","3"],["2\n4 3\n1 2","\\-1"]],"created_at":"2026-03-03 11:00:39"}}