#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
const int fx[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
const int fxx[8][2] = {{0, 1}, {0, -1}, {1, 0},  {-1, 0},
                       {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int i = 0; i < ((int)((t).size())); i++) s << t[i] << " ";
  return s;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > points;
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    points.push_back(make_pair(x, y));
  }
  if (n % 2 != 0) {
    cout << "NO" << endl;
  } else {
    bool ans = true;
    double xprime, yprime;
    int half = n / 2;
    xprime = (points[0].first + points[half].first) / 2.0;
    yprime = (points[0].second + points[half].second) / 2.0;
    for (int i = 0; i < half; i++) {
      double xtemp = (points[i].first + points[i + half].first) / 2.0;
      double ytemp = (points[i].second + points[i + half].second) / 2.0;
      if ((xtemp != xprime) || (ytemp != yprime)) {
        ans = false;
        break;
      }
    }
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
