#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 100100;
int n, x[N], y[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n & 1) return cout << "No", 0;
  vector<pair<int, int> > vecs;
  for (int i = 1; i < n; i++)
    vecs.push_back({x[i] - x[i - 1], y[i] - y[i - 1]});
  vecs.push_back({x[0] - x[n - 1], y[0] - y[n - 1]});
  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)
      return cout << "No", 0;
  cout << "Yes";
}
