#include <bits/stdc++.h>
using namespace std;
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
int main() {
  int n;
  cin >> n;
  if (n % 2 == 1) {
    cout << "No";
    return 0;
  }
  vector<pair<int, int>> vec;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    vec.push_back(make_pair(x, y));
  }
  for (int i = 0; i < n / 2 - 1; ++i) {
    if (vec[i + 1] - vec[i] !=
        make_pair(0, 0) - (vec[i + n / 2 + 1] - vec[i + n / 2])) {
      cout << "No";
      return 0;
    }
  }
  if (vec[n / 2] - vec[n / 2 - 1] != make_pair(0, 0) - (vec[0] - vec[n - 1])) {
    cout << "No";
    return 0;
  }
  cout << "Yes";
}
