#include <bits/stdc++.h>
using namespace std;
int x[100010];
int y[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  if (n % 2 == 1) {
    printf("nO\n");
  } else {
    double px, py;
    int flag = 1;
    px = (x[1] + x[n / 2 + 1]) / 2.0;
    py = (y[1] + y[n / 2 + 1]) / 2.0;
    for (int i = 2; i <= n / 2; i++) {
      if (px != (x[i] + x[n / 2 + i]) / 2.0 ||
          py != (y[i] + y[n / 2 + i]) / 2.0) {
        printf("nO\n");
        flag = 0;
        break;
      }
    }
    if (flag) printf("YES\n");
  }
}
