#include <bits/stdc++.h>
using namespace std;
int n, hn;
int px[200100], py[200100];
int main() {
  cin >> n;
  if (n & 1) {
    cout << "NO" << endl;
    return 0;
  }
  hn = n / 2;
  for (int i = 0; i < n; i++) cin >> px[i] >> py[i];
  for (int i = 0; i <= n; i++) {
    if (px[(i % n)] - px[(i + 1) % n] !=
            -(px[(i + hn) % n] - px[(i + hn + 1) % n]) ||
        py[(i % n)] - py[(i + 1) % n] !=
            -(py[(i + hn) % n] - py[(i + hn + 1) % n])) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
