#include <bits/stdc++.h>
using namespace std;
long long MOD = 9e18;
long long power(long long x, long long n, long long mod) {
  if (n == 0) {
    return 1;
  }
  long long temp = power(x, n / 2, mod);
  if (n % 2 == 1) {
    return (((temp * temp) % mod) * x) % mod;
  } else {
    return (temp * temp) % mod;
  }
}
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long>> polygon;
  long long a, b;
  for (long long i = (0); i <= (n - 1); i++) {
    cin >> a >> b;
    polygon.push_back({a, b});
  }
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  bool sol = true;
  long long c, d;
  long long checkX;
  long long checkY;
  for (long long i = (0); i <= (n / 2 - 1); i++) {
    a = i;
    b = (i + 1) % n;
    c = (i + n / 2) % n;
    d = (i + n / 2 + 1) % n;
    checkX = polygon[a].first - polygon[b].first;
    checkX += polygon[c].first - polygon[d].first;
    checkY = polygon[a].second - polygon[b].second;
    checkY += polygon[c].second - polygon[d].second;
    if (checkY != 0 || checkX != 0) {
      sol = false;
      break;
    }
  }
  if (sol) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
