#include <bits/stdc++.h>
using namespace std;
long long n, k;
int main() {
  cin >> n;
  vector<pair<int, int>> v(n);
  if (n % 2 != 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    v[i] = make_pair(a, b);
  }
  bool flag = true;
  for (int i = 0; i < n / 2 - 1; ++i) {
    if (((v[i + 1].first - v[i].first) !=
         (v[i + n / 2].first - v[i + 1 + n / 2].first)) ||
        ((v[i + 1].second - v[i].second) !=
         (v[i + n / 2].second - v[i + 1 + n / 2].second))) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
