#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  while (cin >> n) {
    vector<int> x(n), y(n);
    for (int i = 0; i < n; ++i) {
      cin >> x[i] >> y[i];
    }
    if (n % 2) {
      cout << "NO";
    } else {
      bool good = true;
      int xm = x[n / 2] + x[0];
      int ym = y[n / 2] + y[0];
      for (int i = 1; i < n / 2; ++i) {
        int j = i + n / 2;
        int xc = x[i] + x[j];
        int yc = y[i] + y[j];
        if (xm != xc || ym != yc) {
          good = false;
        }
      }
      cout << (good ? "YES" : "NO");
    }
    cout << "\n";
  }
}
