#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll N = 1e5 + 19;
ll a[2][N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n, ans = 0;
  cin >> n;
  map<ll, map<ll, ll>> mp;
  for (ll i = 0; i <= n / 2; ++i) {
    cin >> a[0][i] >> a[1][i];
    if (i) {
      ll x = a[0][i] - a[0][i - 1];
      ll y = a[1][i] - a[1][i - 1];
      mp[x][y]++;
    }
  }
  bool flag = 0;
  for (ll i = n / 2 + 1; i < n; ++i) {
    cin >> a[0][i] >> a[1][i];
    ll x = a[0][i - 1] - a[0][i];
    ll y = a[1][i - 1] - a[1][i];
    if (mp[x][y])
      mp[x][y]--;
    else
      flag = 1;
  }
  if (flag)
    cout << "nO";
  else
    cout << "YES";
  return 0;
}
