#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long z = 1000000000;
const long long N = 1e5 + 1;
const long long INF = 1e18;
template <typename T, typename T1>
T amax(T &a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T &a, T1 b) {
  if (b < a) a = b;
  return a;
}
long long powe(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long t = powe(x, y / 2);
  t = (t * t) % mod;
  if (y % 2 == 1) t = (t * x) % mod;
  return t;
}
long long t, n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  vector<long long> x(n), y(n);
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  long long a = n / 2;
  long long midx = (x[0] + x[a]);
  long long midy = (y[0] + y[a]);
  for (long long i = 0; i < n / 2; i++) {
    if ((x[i] + x[i + a]) != (midx) || (y[i] + y[i + a]) != (midy)) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
