#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
struct node {
  long long x, y;
  node operator-(node A) {
    node ans;
    ans.x = x - A.x;
    ans.y = y - A.y;
    return ans;
  }
  void print() { cout << x << " " << y << endl; }
} p[maxn];
bool check(node a, node b, node c, node d) {
  node A = a - b;
  node B = d - c;
  if (A.x == B.x && A.y == B.y) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y;
  }
  if (n & 1) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < n / 2; i++) {
    if (!check(p[i], p[i + 1], p[i + n / 2],
               p[(i + n / 2 + 1) == n ? 0 : i + n / 2 + 1])) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
