#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
struct node {
  double x, y;
} sp[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> sp[i].x >> sp[i].y;
  if (n & 1)
    cout << "nO" << endl;
  else {
    int flag = 0;
    double cx, cy;
    cx = (sp[1].x + sp[n / 2 + 1].x) / 2;
    cy = (sp[1].y + sp[n / 2 + 1].y) / 2;
    for (int i = 2; i <= n / 2; ++i) {
      double dx, dy;
      dx = (sp[i].x + sp[i + n / 2].x) / 2;
      dy = (sp[i].y + sp[i + n / 2].y) / 2;
      if (dx != cx || dy != cy) {
        flag = 1;
        break;
      }
    }
    if (flag == 1)
      cout << "nO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
