#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x, y;
  pt() {}
  pt(int x_, int y_) {
    x = x_;
    y = y_;
  }
};
pt operator+(pt a, pt b) { return pt(a.x + b.x, a.y + b.y); }
pt operator-(pt a, pt b) { return pt(a.x - b.x, a.y - b.y); }
bool eq(pt a, pt b) { return (a.x == b.x && a.y == b.y); }
signed main() {
  ios::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<pt> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].x >> v[i].y;
  }
  if (n % 2 == 1) {
    cout << "no";
    return 0;
  }
  pt a, b;
  for (int i = 0; i < n / 2; i++) {
    a = v[i] - v[i + 1];
    b = v[i + (n / 2)] - v[(i + 1 + (n / 2)) % n];
    if (!eq((a + b), pt(0, 0))) {
      cout << "no";
      return 0;
    }
  }
  cout << "yes";
  return 0;
}
