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