#include <bits/stdc++.h>
using namespace std;
const int maxn = 300005;
long long x[maxn], y[maxn];
set<pair<int, int> > S;
int main() {
  long long n, midx = 0, midy = 0;
  scanf("%lld", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%lld%lld", &x[i], &y[i]);
    x[i] *= n, y[i] *= n;
    midx += x[i];
    midy += y[i];
    S.insert(pair<int, int>(x[i], y[i]));
  }
  midx /= n;
  midy /= n;
  for (int i = 0; i < n; ++i) {
    if (!S.count({midx * 2 - x[i], midy * 2 - y[i]})) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
