#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
using namespace std;
const long long inf = 1ll << 60;
const long long iinf = 2147483647;
const long long mod = 998244353;
const long long maxn = 1e3 + 5;
long long pw(long long x, long long p) {
  long long ret = 1;
  while (p > 0) {
    if (p & 1) {
      ret *= x;
      ret %= mod;
    }
    x *= x;
    x %= mod;
    p >>= 1;
  }
  return ret;
}
long long inv(long long x) { return pw(x, mod - 2); }
long double hypolen(pair<long long, long long> x,
                    pair<long long, long long> y) {
  return sqrt((y.second - x.second) * (y.second - x.second) +
              (y.first - x.first) * (y.first - x.first));
}
long double slope(pair<long long, long long> x, pair<long long, long long> y) {
  if (x.first == y.first) {
    return iinf;
  }
  return ((y.second - x.second) / (y.first - x.first));
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<pair<long long, long long> > vc(n);
  for (long long i = (0); i < (n); i++) {
    cin >> vc[i].first >> vc[i].second;
  }
  if (n % 2) {
    cout << "No" << '\n';
    return 0;
  }
  long long div = n / 2;
  bool qq = false;
  for (long long i = (0); i < (n); i++) {
    long double ansa = hypolen(vc[i], vc[(i + 1) % n]),
                ansb = slope(vc[i], vc[(i + 1) % n]);
    long double tmpa = hypolen(vc[(i + div) % n], vc[(i + div + 1) % n]),
                tmpb = slope(vc[(i + div) % n], vc[(i + div + 1) % n]);
    if (ansa != tmpa || ansb != tmpb) {
      qq = true;
      break;
    }
  }
  if (qq)
    cout << "No" << '\n';
  else
    cout << "YES" << '\n';
}
