#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> x(n), y(n);
  for (long long i = 0, _n = (n); i < _n; i++) cin >> x[i] >> y[i];
  if (n % 2) {
    cout << "NO";
    return;
  }
  long long a = n / 2;
  double x0 = ((double)(x[0] + x[a])) / 2;
  double y0 = ((double)(y[0] + y[a])) / 2;
  for (long long i = 0, _n = (a - 1); i < _n; i++) {
    double x1 = ((double)(x[i + 1] + x[a + 1 + i])) / 2;
    double y1 = ((double)(y[i + 1] + y[a + 1 + i])) / 2;
    if (x1 == x0 && y1 == y0) {
      continue;
    } else {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(11);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
