#include <bits/stdc++.h>
using namespace std;
void yes() {
  cout << "YES\n";
  exit(0);
}
void no() {
  cout << "NO\n";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<pair<int, int>> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  if (n & 1) {
    no();
  }
  n /= 2;
  double x = a[0].first + (a[n].first - a[0].first) / 2.;
  double y = a[0].second + (a[n].second - a[0].second) / 2.;
  for (int i = 1; i < n; i++) {
    double curX = a[i].first + (a[n + i].first - a[i].first) / 2.;
    double curY = a[i].second + (a[n + i].second - a[i].second) / 2.;
    if (x != curX || y != curY) {
      no();
    }
  }
  yes();
}
