#include <bits/stdc++.h>
using namespace std;
inline int lowbit(int x) { return x & (-x); }
const int N = 1e5 + 5;
struct P {
  double x, y;
  P() {}
  P(double _x, double _y) {
    x = _x;
    y = _y;
  }
} p[N];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = (1); i <= (n); ++i) {
    double x, y;
    cin >> x >> y;
    p[i] = (P){x, y};
  }
  if (n & 1) {
    cout << "nO\n";
  } else {
    double posx = (p[1].x + p[1 + n / 2].x) / 2;
    double posy = (p[1].y + p[1 + n / 2].y) / 2;
    bool flag = true;
    for (int i = (1); i <= (n / 2); ++i) {
      if ((p[i].x + p[i + n / 2].x) / 2 != posx ||
          (p[i].y + p[i + n / 2].y) / 2 != posy) {
        flag = false;
        break;
      }
    }
    if (flag) {
      cout << "YES\n";
    } else {
      cout << "nO\n";
    }
  }
  return 0;
}
