#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  T = 1;
  while (T--) {
    int n;
    scanf("%d", &n);
    if (n & 1) {
      printf("NO\n");
      continue;
    }
    vector<pair<int, int>> v;
    for (int i = 1; i <= n; i++) {
      int x, y;
      scanf("%d %d", &x, &y);
      v.push_back(make_pair(x, y));
    }
    int cx = (v[0].first + v[n / 2].first),
        cy = (v[0].second + v[n / 2].second);
    bool yes = 1;
    for (int i = 1; i < n / 2; i++) {
      if (cx == (v[i].first + v[i + n / 2].first) &&
          cy == (v[i].second + v[i + n / 2].second))
        ;
      else {
        yes = 0;
        break;
      }
    }
    if (yes)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
