#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, A = 2e5 + 5;
struct point {
  int x, y;
};
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  point p[n];
  for (int i = 0; i < n; i++) cin >> p[i].x >> p[i].y;
  if (n % 2) return cout << "NO", 0;
  for (int i = 0; i < n / 2; i++) {
    if (p[0].x + p[n / 2].x != p[i].x + p[i + n / 2].x ||
        p[0].y + p[n / 2].y != p[i].y + p[i + n / 2].y)
      return cout << "NO", 0;
  }
  cout << "YES";
  return 0;
}
