#include <bits/stdc++.h>
#pragma comment(linker, "/stack:512000000")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937_64 gen(time(NULL));
ll const mod = 1e9 + 7;
namespace {
ll mul(ll a, ll b) {
  ll val = a * b - (ll)((ld)a * b / mod) * mod;
  if (val < 0) val += mod;
  if (val >= mod) val -= mod;
  return val;
}
ll poww(ll a, ll b) {
  ll val = 1;
  a %= mod;
  while (b > 0) {
    if (b % 2) val = mul(a, val);
    a = mul(a, a);
    b >>= 1;
  }
  return val % mod;
}
ll inv(ll a) { return poww(a, mod - 2); }
}  // namespace
ll const maxn = 3e5 + 6;
ll gcd(ll a, ll b) { return (a == 0 ? b : gcd(b % a, a)); }
pair<ll, ll> norm(pair<ll, ll> v) {
  ll g = gcd(abs(v.first), abs(v.second));
  return {v.first / g, v.second / g};
}
pair<ll, ll> operator-(pair<ll, ll> a, pair<ll, ll> b) {
  return (make_pair(a.first - b.first, a.second - b.second));
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll n;
  cin >> n;
  vector<pair<ll, ll>> kek(n);
  for (ll i = 0; i < n; i++) {
    cin >> kek[i].first >> kek[i].second;
  }
  vector<pair<ll, ll>> roflan;
  for (ll i = 1; i < n; i++) {
    roflan.push_back(kek[i] - kek[i - 1]);
  }
  roflan.push_back(kek[0] - kek[n - 1]);
  if (n % 2 == 0) {
    bool f = true;
    for (ll i = 0; i < n / 2; i++) {
      auto p = roflan[i];
      auto p1 = roflan[n / 2 + i];
      auto pp = p;
      pp.first *= -1;
      pp.second *= -1;
      if (pp != p1) f = false;
    }
    if (f) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  } else {
    cout << "No\n";
  }
  return 0;
}
