č¨įŽä¸åŋéģåž åå°æ¯åéģå¸ļåéŠįŽ
ä¸åŋéģ
å°æžå°æéģ
å¯čŊ䏿¯æ´æ¸īŧå
*2 å /n
čŠåįĩæ(åč) īŧ AC (5ms, 972KB)
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
while(true){
cin >> n;
if(n == 0) break;
double mx=0, my=0;
set<pair<int, int>> p;
for(int i=0; i<n; i++){
int x, y;
cin >> x >> y;
p.insert({x, y});
mx += x;
my += y;
}
mx = mx*2/n;
my = my*2/n;
string ans = "yes";
for(auto& a : p){
if(!p.count({mx-a.first, my-a.second})){
ans = "no";
break;
}
}
cout << ans << "\n";
}
return 0;
}