#include <bits/stdc++.h>
const int maxn = 100100;
struct Point {
  long long x, y;
  Point(long long _x = 0, long long _y = 0) : x(_x), y(_y) {}
  Point operator-(const Point& b) const { return Point(x - b.x, y - b.y); }
} p[maxn];
bool is_ok(const Point& a, const Point& b) {
  return a.x == -b.x && a.y == -b.y;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%lld%lld", &p[i].x, &p[i].y);
  bool ans = true;
  if (n & 1)
    ans = false;
  else {
    for (int i = 0; i < n / 2; ++i)
      if (!is_ok(p[i + 1] - p[i],
                 p[(i + n / 2 + 1) % n] - p[(i + n / 2) % n])) {
        ans = false;
        break;
      }
  }
  printf("%s\n", ans ? "YES" : "NO");
  return 0;
}
