#include <bits/stdc++.h>
using namespace std;
long long P = 1e9 + 7;
long long P1 = 998244353;
const int sqr = 500;
const int arrn = 1e6 + 5;
const int arrn2 = 6e3 + 5;
void solve() {
  int n;
  cin >> n;
  vector<pair<long long, long long> > pnts(n);
  for (int i = 0; i < n; i++) cin >> pnts[i].first >> pnts[i].second;
  if (n % 2) {
    cout << "NO";
    return;
  }
  pnts.push_back(pnts[0]);
  vector<pair<long long, long long> > vecs(n);
  for (int i = 1; i < n + 1; i++) {
    vecs[i - 1].first = pnts[i].first - pnts[i - 1].first;
    vecs[i - 1].second = pnts[i].second - pnts[i - 1].second;
  }
  for (int i = 0; i < n / 2; i++) {
    if (vecs[i].first != -vecs[i + n / 2].first ||
        vecs[i].second != -vecs[i + n / 2].second) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
