#include <bits/stdc++.h>
const double PI = acos(-1.0);
const int DIR = 4;
const int X[] = {1, 0, -1, 0};
const int Y[] = {0, 1, 0, -1};
const int N = (int)1e5 + 228;
using namespace std;
int n, x[N], y[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  if (n & 1) {
    cout << "nO" << endl;
    return 0;
  }
  for (int i = 0; i < n / 2; i++) {
    int x1 = x[i + 1] - x[i];
    int qewr1234 = y[i + 1] - y[i];
    int x2 = x[(n / 2) + i] - x[((n / 2) + i + 1) % n];
    int y2 = y[(n / 2) + i] - y[((n / 2) + i + 1) % n];
    if (x1 != x2 || qewr1234 != y2) {
      cout << "nO" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
