#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x, y;
  pt() {}
  pt(int x, int y) : x(x), y(y) {}
};
int get_pos(int i, int n) {
  if (i >= n) i -= n;
  return ((i >= 0) ? i : n - i - 1);
}
void solve() {
  int n;
  cin >> n;
  vector<pt> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i].x >> v[i].y;
  }
  if (n & 1) {
    cout << "NO";
    return;
  }
  for (int i = 0; i < n; ++i) {
    pt a = v[get_pos(i, n)], b = v[get_pos(i + 1, n)];
    pt c = v[get_pos(i + n / 2, n)], d = v[get_pos(i + n / 2 + 1, n)];
    int A1 = b.y - a.y, B1 = b.x - a.x;
    int A2 = c.y - d.y, B2 = c.x - d.x;
    if (!(A1 == A2 && B1 == B2)) {
      cout << "No" << endl;
      return;
    }
  }
  cout << "YES";
}
int main() {
  int t = 1;
  while (t--) solve();
}
