#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  point operator-(point other) { return {x - other.x, y - other.y}; }
  bool operator==(point p) { return x == p.x && y == p.y; }
};
point read() {
  int x, y;
  cin >> x >> y;
  return {x, y};
}
int main() {
  int n;
  cin >> n;
  vector<point> p;
  for (int i = 0; i < n; ++i) {
    p.push_back(read());
  }
  if (n % 2 == 1) {
    cout << "NO";
  } else {
    for (int i = 0; i < n / 2; ++i) {
      if (!((p[i + 1] - p[i]) == ((p[i + n / 2] - p[(i + n / 2 + 1) % n])))) {
        cout << "NO\n";
        return 0;
      }
    }
    cout << "YES\n";
  }
  return 0;
}
