#include <bits/stdc++.h>
using namespace std;
long long EPS = 0;
struct pt {
  long long x, y;
  pt(long long x, long long y) : x(x), y(y) {}
  pt() {}
  long long norm2() { return *this * *this; }
  bool operator==(pt p) { return abs(x - p.x) <= EPS && abs(y - p.y) <= EPS; }
  pt operator+(pt p) { return pt(x + p.x, y + p.y); }
  pt operator-(pt p) { return pt(x - p.x, y - p.y); }
  pt operator*(long long t) { return pt(x * t, y * t); }
  double operator*(pt p) { return x * p.x + y * p.y; }
  long long operator%(pt p) { return x * p.y - y * p.x; }
  bool operator<(pt p) const {
    return x < p.x - EPS || (abs(x - p.x) <= EPS && y < p.y - EPS);
  }
  bool left(pt p, pt q) { return (q - p) % (*this - p) > EPS; }
};
void bad() {
  cout << "NO\n";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<pt> a(n);
  for (int i = 0, ThxDem = n; i < ThxDem; ++i) cin >> a[i].x >> a[i].y;
  if (n & 1) bad();
  for (int i = 0, ThxDem = n; i < ThxDem; ++i) {
    int l1 = i, l2 = (l1 + 1) % n;
    int r1 = (i + n / 2) % n, r2 = (r1 + 1) % n;
    if ((a[l2] - a[l1]) == (a[r1] - a[r2])) continue;
    bad();
  }
  cout << "YES\n";
}
