#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
int n, x[N], y[N], dx[N], dy[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  x[n] = x[0];
  y[n] = y[0];
  for (int i = 0; i < n; i++) {
    dx[i] = x[i + 1] - x[i];
    dy[i] = y[i + 1] - y[i];
  }
  if (n % 2 != 0) {
    puts("NO");
    exit(0);
  }
  for (int i = 0; i < n; i++) {
    int j = (i + n / 2) % n;
    if (dx[i] != -dx[j] || dy[i] != -dy[j]) {
      puts("NO");
      exit(0);
    }
  }
  puts("YES");
  return 0;
}
