#include <bits/stdc++.h>
using namespace std;
const int N = 100500;
using ll = long long;
using point = pair<ll, ll>;
ll& x(point& p) { return p.first; }
ll& y(point& p) { return p.second; }
int n;
point p[N], p2[N];
set<point> s;
point centerN, center2, invP;
int no() {
  cout << "NO" << endl;
  return 0;
}
int main() {
  cin >> n;
  x(centerN) = 0;
  y(centerN) = 0;
  for (int i = 0; i < n; ++i) {
    cin >> x(p[i]) >> y(p[i]);
    x(p2[i]) = 2 * x(p[i]);
    y(p2[i]) = 2 * y(p[i]);
    x(centerN) += x(p[i]);
    y(centerN) += y(p[i]);
  }
  if ((2 * x(centerN)) % n != 0 || (2 * y(centerN)) % n != 0) {
    return no();
  }
  x(center2) = 2 * x(centerN) / n;
  y(center2) = 2 * y(centerN) / n;
  for (int i = 0; i < n; ++i) {
    x(p2[i]) -= x(center2);
    y(p2[i]) -= y(center2);
    s.insert(p2[i]);
  }
  for (int i = 0; i < n; ++i) {
    x(invP) = -x(p2[i]);
    y(invP) = -y(p2[i]);
    auto it = s.find(invP);
    if (it == s.end()) {
      return no();
    }
  }
  cout << "YES" << endl;
  return 0;
}
