#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
using ll = long long;
using pll = pair<ll, ll>;
int n;
pll a[N];
set<pll> s;
int main() {
  int n;
  scanf("%d", &n);
  ll sumx = 0, sumy = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &a[i].first, &a[i].second);
    sumx += a[i].first, sumy += a[i].second;
    s.insert(a[i]);
  }
  if (n & 1) {
    cout << "NO" << endl;
    return 0;
  }
  ll x1 = a[1].first + a[n / 2 + 1].first,
     y1 = a[1].second + a[n / 2 + 1].second;
  for (int i = 1; i <= n / 2; i++)
    if (a[i].first + a[n / 2 + i].first != x1 ||
        a[i].second + a[n / 2 + i].second != y1) {
      cout << "NO" << endl;
      return 0;
    }
  cout << "YES" << endl;
  return 0;
}
