#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<int, int>> a;
pair<int, int> m;
int chk = 1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a.push_back({x, y});
  }
  if (n % 2) {
    cout << "NO";
  } else {
    m = {a[0].first + a[n / 2].first, a[0].second + a[n / 2].second};
    for (int i = 1; i < n / 2; i++) {
      if (m.first != a[i].first + a[n / 2 + i].first ||
          m.second != a[i].second + a[n / 2 + i].second) {
        chk = 0;
        break;
      }
    }
    if (chk)
      cout << "YES";
    else
      cout << "NO";
  }
}
