#include <bits/stdc++.h>
using namespace std;
int x[100005], y[100005], n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n & 1) {
    cout << "NO" << endl;
    return 0;
  }
  int zx = x[0] + x[n / 2], zy = y[0] + y[n / 2];
  for (int i = 0; i < n / 2; i++) {
    if (x[i] + x[i + n / 2] != zx || y[i] + y[i + n / 2] != zy) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
