#include <bits/stdc++.h>
using namespace std;
map<long double, int> mp, mp2;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<pair<long double, long double> > v(n);
  for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  for (int i = 1; i < n; i++) {
    mp[(v[i].second - v[i - 1].second) / (v[i].first - v[i - 1].first)]++;
    mp2[(v[i].second - v[i - 1].second) * (v[i].second - v[i - 1].second) +
        (v[i].first - v[i - 1].first) * (v[i].first - v[i - 1].first)]++;
  }
  mp[(v[n - 1].second - v[0].second) / (v[n - 1].first - v[0].first)]++;
  mp2[(v[n - 1].second - v[0].second) * (v[n - 1].second - v[0].second) +
      (v[n - 1].first - v[0].first) * (v[n - 1].first - v[0].first)]++;
  for (auto it : mp)
    if (it.second % 2) {
      cout << "NO";
      return 0;
    }
  for (auto it : mp2)
    if (it.second % 2) {
      cout << "NO";
      return 0;
    }
  cout << "YES";
}
