#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  vector<pair<long long, long long> > points;
  vector<pair<long long, long long> > edges;
  for (int i = 0, x, y; i < n; i++) {
    cin >> x >> y;
    points.push_back({x, y});
  }
  for (int i = 1; i < n; i++) {
    auto& last = points[i - 1];
    auto& now = points[i];
    edges.push_back({now.first - last.first, now.second - last.second});
  }
  edges.push_back({points[0].first - points[n - 1].first,
                   points[0].second - points[n - 1].second});
  for (int i = 0; i < n / 2; i++) {
    if (edges[i].first != -edges[i + n / 2].first ||
        edges[i].second != -edges[i + n / 2].second) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
