#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
int die() {
  cout << "NO" << endl;
  return 0;
}
bool is_paral(const pair<ll, ll> p0, const pair<ll, ll> p1,
              const pair<ll, ll> p2, const pair<ll, ll> p3) {
  return ((p1.first - p0.first) == (p2.first - p3.first)) &&
         ((p1.second - p0.second) == (p2.second - p3.second));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;
  cin >> n;
  vector<pair<ll, ll>> p(n);
  for (ll i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  if (n % 2) return die();
  ll x = n / 2;
  for (ll i = 0; i < n / 2 - 1; i++) {
    if (!is_paral(p[i], p[i + 1], p[i + x], p[i + 1 + x])) return die();
  }
  cout << "YES" << endl;
}
