#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline int lb(int x) { return x & -x; }
long long qpow(long long base, int n) {
  if (base == 0) return 0;
  long long ans = 1;
  while (n) {
    if (n & 1) ans *= base;
    n >>= 1;
    base *= base;
  }
  return ans;
}
int n;
vector<pair<long long, long long> > ve;
bool solve() {
  if (n & 1) return false;
  long long mix = 1e18, miy = 1e18, tmix, tmiy;
  for (int i = (1); i <= (n / 2); ++i) {
    tmix = ve[i].first + ve[i + (n / 2)].first;
    tmiy = ve[i].second + ve[i + (n / 2)].second;
    if (mix == 1e18 && miy == 1e18) {
      mix = tmix;
      miy = tmiy;
    } else {
      if (mix != tmix || miy != tmiy) return false;
    }
  }
  return true;
}
int main() {
  cin >> n;
  ve.push_back(make_pair((0), (0)));
  for (int i = (1); i <= (n); ++i) {
    long long a, b;
    cin >> a >> b;
    ve.push_back(make_pair((a), (b)));
  }
  if (solve())
    printf("YES\n");
  else
    printf("NO\n");
}
