#include <bits/stdc++.h>
const int MAXN = 1e5 + 5;
struct Node {
  int x, y;
  bool operator==(const Node& rhs) {
    return ((x) > 0 ? (x) : (-(x))) == ((rhs.x) > 0 ? (rhs.x) : (-(rhs.x))) &&
           ((y) > 0 ? (y) : (-(y))) == ((rhs.y) > 0 ? (rhs.y) : (-(rhs.y)));
  }
} no[MAXN], v[MAXN];
int n;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n;
  if (n & 1) {
    puts("NO");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    std::cin >> no[i].x >> no[i].y;
  }
  for (int i = 0; i < n; i++)
    v[i].x = no[i].x - no[(i + 1) % n].x, v[i].y = no[i].y - no[(i + 1) % n].y;
  bool ok = true;
  for (int i = 0; i < n / 2; i++) ok &= (v[i] == v[i + (n / 2)]);
  ok ? puts("YES") : puts("NO");
  return 0;
}
