#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  std::vector<std::pair<int, int>> points;
  for (int i = 0, x, y; i < n; i++) {
    scanf("%d%d", &x, &y);
    points.emplace_back(x, y);
  }
  if (n & 1) {
    puts("NO");
    return 0;
  }
  std::map<std::pair<int, int>, int> dic;
  for (int i = 0; i < n; i++) {
    int x = points[i].first - points[(i + 1) % n].first;
    int y = points[i].second - points[(i + 1) % n].second;
    dic[{x, y}]--;
    dic[{-x, -y}]++;
  }
  for (auto& [key, value] : dic) {
    if (value != 0) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
