#include <bits/stdc++.h>
using namespace std;
ifstream in("taxi.in");
ofstream out("taxi.out");
mt19937 sd(1337);
void no() {
  cout << "NO";
  exit(0);
}
int main() {
  cin.tie(0);
  cout.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  ;
  int n;
  cin >> n;
  if (n % 2) no();
  vector<pair<int, int> > dots(n / 2);
  for (int i = 0; i < n / 2; i++) cin >> dots[i].first >> dots[i].second;
  pair<int, int> prev;
  for (int i = 0; i < n / 2; i++) {
    pair<int, int> cur;
    cin >> cur.first >> cur.second;
    if (i != 0) {
      if (dots[i].first - dots[i - 1].first != prev.first - cur.first ||
          dots[i].second - dots[i - 1].second != prev.second - cur.second)
        no();
    }
    prev = cur;
  }
  cout << "YES";
}
