#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5 + 10;
const double eps = 1e-9;
struct point {
  int x, y;
  point operator-(const point& b) { return {x - b.x, y - b.y}; }
  bool operator==(const point& b) { return x == b.x && y == b.y; }
};
bool ki(point a, point b, point c, point d) { return (b - a) == (c - d); }
int main() {
  int n;
  scanf("%d", &n);
  vector<point> q(n);
  for (auto& v : q) {
    scanf("%d%d", &v.x, &v.y);
  }
  if (n & 1) {
    printf("NO\n");
  } else {
    bool can = true;
    for (int i = 0; can && i < n / 2; i++) {
      if (!ki(q[i], q[i + 1], q[i + n / 2], q[(i + n / 2 + 1) % n])) {
        can = false;
      }
    }
    if (can)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
