#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > A;
int n, x, y;
void no() {
  cout << "NO\n";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int n;
  cin >> n;
  if (n & 1) no();
  for (int i = 0; i <= n; i++) {
    if (i != n)
      cin >> x >> y;
    else {
      x = A[0].first;
      y = A[0].second;
    }
    A.push_back({x, y});
    if (i > n / 2) {
      if (A[i].second - A[i - 1].second !=
          -A[i - n / 2].second + A[i - n / 2 - 1].second)
        no();
      if (A[i].first - A[i - 1].first !=
          -A[i - n / 2].first + A[i - n / 2 - 1].first)
        no();
    }
  }
  cout << "YES\n";
  return 0;
}
