#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> v;
int main() {
  long long n;
  cin >> n;
  long long inx, iny;
  for (long long i = 0; i < n; i++) {
    cin >> inx >> iny;
    v.push_back(make_pair(inx, iny));
  }
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  for (long long i = 0; i + 1 < n / 2; 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;
}
