#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
long long power(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod % mod;
    a = a * a % mod;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long i, t, p, n, m;
  long double j, k;
  cin >> n;
  long double x[n], y[n];
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  long double mx = 0, my = 0;
  if (n % 2 == 1) {
    cout << "NO"
         << "\n";
    return 0;
  } else {
    for (i = 0; i < n / 2; i++) {
      if (i == 0) {
        mx = (x[i] + x[i + n / 2]) / 2;
        my = (y[i] + y[i + n / 2]) / 2;
      } else {
        j = (x[i] + x[i + n / 2]) / 2;
        k = (y[i] + y[i + n / 2]) / 2;
        if (j == mx && k == my) {
          continue;
        } else {
          cout << "NO"
               << "\n";
          return 0;
        }
      }
    }
    cout << "YES"
         << "\n";
  }
  return 0;
}
