#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int kk;
  kk = 1;
  while (kk--) {
    int n;
    cin >> n;
    cin.ignore();
    vector<pair<int, int> > par;
    for (int i = 0; i < n; i++) {
      int a, b;
      cin >> a;
      cin.ignore();
      cin >> b;
      cin.ignore();
      par.push_back(make_pair(a, b));
    }
    if (n & 1) {
      cout << "NO";
      continue;
    }
    bool flag = true;
    par.push_back(make_pair(par[0].first, par[0].second));
    for (int i = 0; i < n / 2; i++)
      if ((par[i].first - par[i + 1].first) !=
              (par[i + 1 + n / 2].first - par[i + n / 2].first) ||
          (par[i].second - par[i + 1].second) !=
              (par[i + 1 + n / 2].second - par[i + n / 2].second)) {
        cout << "NO";
        flag = false;
        break;
      }
    if (flag) cout << "YES";
    continue;
  }
  return 0;
}
