#include <bits/stdc++.h>
const int LIM = 1e5 + 5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n % 2) {
    cout << "NO";
    return 0;
  } else {
    int mid = n / 2;
    for (int i = 0; i < mid - 1; i++) {
      if (x[i] - x[i + 1] == x[i + mid + 1] - x[i + mid] &&
          y[i] - y[i + 1] == y[i + mid + 1] - y[i + mid]) {
        continue;
      } else {
        cout << "NO";
        return 0;
      }
    }
    cout << "YES";
  }
  return 0;
}
