#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
long long x[maxn], y[maxn], n;
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n & 1) {
    cout << "NO\n";
    return;
  }
  for (int i = 0; i < n / 2; i++) {
    if ((x[0] + x[n / 2]) != (x[i] + x[i + n / 2]) ||
        (y[0] + y[n / 2]) != (y[i] + y[i + n / 2])) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
}
signed main() {
  ios::sync_with_stdio(false), cin.tie(NULL);
  solve();
}
