#include <bits/stdc++.h>
int main() {
  static constexpr int kMaxN = 100000;
  static std::pair<int, int> points[kMaxN];
  int n;
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::cin >> points[i].first >> points[i].second;
  }
  bool are_similar = (n & 1) == 0;
  int half = n / 2;
  int double_middle_x = points[0].first + points[half].first;
  int double_middle_y = points[0].second + points[half].second;
  for (int i = 1; i < half && are_similar; ++i) {
    are_similar = double_middle_x == points[i].first + points[half + i].first &&
                  double_middle_y == points[i].second + points[half + i].second;
  }
  std::cout << ((are_similar) ? ("YES") : ("NO"));
  return 0;
}
