#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n = 0;
  cin >> n;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  if (n & 1) {
    cout << "NO\n";
    return;
  }
  for (int i = 0; i < (n / 2); i++) {
    if ((x[i + 1] - x[i]) !=
        (x[(i + (n / 2)) % n] - x[(i + (n / 2) + 1) % n])) {
      cout << "NO\n";
      return;
    }
    if ((y[i + 1] - y[i]) !=
        (y[(i + (n / 2)) % n] - y[(i + (n / 2) + 1) % n])) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
