#include <bits/stdc++.h>
using namespace std;
const bool DEBUG = true;
template <class T>
void print1D(T v) {
  if (DEBUG) {
    for (auto e : v) cout << e << " ";
    cout << endl;
  }
}
template <class T>
void print1D(T v, int min_incl, int max_incl) {
  if (DEBUG) {
    for (int i = min_incl; i <= max_incl; i++) cout << v[i] << " ";
    cout << endl;
  }
}
template <class T>
void print2D(T v) {
  if (DEBUG)
    for (auto a : v) print1D(a);
}
template <class T>
void print2D(T v, int min_incl, int max_incl, bool square) {
  if (DEBUG) {
    for (int i = min_incl; i <= max_incl; i++) {
      if (square)
        print1D(v[i], min_incl, max_incl);
      else
        print1D(v[i]);
    }
  }
}
template <class T>
void printPair(T p) {
  if (DEBUG) cout << "(" << p.first << ", " << p.second << ")" << endl;
}
void printVPair(vector<pair<int, int> > v) {
  if (DEBUG)
    for (pair<int, int> p : v) printPair(p);
}
void printSet(set<pair<int, int> > s) {
  for (auto it = s.begin(); it != s.end(); ++it) printPair(*it);
}
vector<pair<int, int> > translate(vector<pair<int, int> > p, int dx, int dy) {
  for (pair<int, int> &c : p) {
    c.first += dx;
    c.second += dy;
  }
  return p;
}
bool collinear(pair<int, int> p1, pair<int, int> p2, pair<int, int> p3) {
  int a = p1.first * (p2.second - p3.second) +
          p2.first * (p3.second - p1.second) +
          p3.first * (p1.second - p2.second);
  if (a == 0) return true;
  return false;
}
int main() {
  int n = 0;
  cin >> n;
  ;
  if (n % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  vector<pair<int, int> > p(n);
  for (int i = 0; i < n; i++) {
    int first, second;
    cin >> first >> second;
    p[i] = {first, second};
  }
  p.push_back(p[0]);
  bool sym = true;
  for (int i = 0; i < n / 2; i++) {
    int dx1 = p[i + 1].first - p[i].first;
    int dy1 = p[i + 1].second - p[i].second;
    int dx2 = p[n / 2 + i + 1].first - p[n / 2 + i].first;
    int dy2 = p[n / 2 + i + 1].second - p[n / 2 + i].second;
    if (dx1 != -dx2 || dy1 != -dy2) {
      sym = false;
      break;
    }
  }
  if (sym) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
